A vertical flow constructed wetland was combined with a biological aerated filter to develop an ecological filter, and to obtain the optimal operating parameters: The hydraulic loading was 1.55 m3/(m2·d), carbon–nitrogen ratio was 10, and gas–water ratio was 6. The experimental results demonstrated considerable removal efficiency of chemical oxygen demand (COD), ammonia nitrogen (NH4+-N), total nitrogen (TN), and total phosphorus (TP) in wastewater by the ecological filter, with average removal rates of 83.79%, 93.10%, 52.90%, and 79.07%, respectively. Concentration of NH4+-N after treatment met the level-A discharge standard of GB18918-2002. Compared with non-plant filter, the ecological filter improved average removal efficiency of COD, NH4+-N, TN, and TP by 13.03%, 25.30%, 14.80%, and 2.32%, respectively: thus, plants significantly contribute to the removal of organic pollutants and nitrogen. Through microporous aeration and O2 secretion of plants, the ecological filter formed an aerobic–anaerobic–aerobic alternating environment; thus aerobic and anaerobic microbes were active and effectively removed organic pollutants. Meanwhile, nitrogen and phosphorus were directly assimilated by plants and as nutrients of microorganisms. Meanwhile, pollutants were removed through nitrification, denitrification, filtration, adsorption, and interception by the filler. High removal rates of pollutants on the ecological filter proved that it is an effective wastewater-treatment technology for decentralized wastewater of mountainous towns.