In the field of the microbial ecology of biofilms and activated sludges, it is widely accepted that the microstructure of the communities depends on the environmental factors. Nevertheless, due to their complexity, the exact mechanisms are still unknown. In this study, we applied a stepwise increase of an azo-dye concentration as a selective factor for adaptation towards biodegradation. The degrading biofilm was developed in a lab-scale sand biofilter. It functioned in a semi-continuous regime for 623 h. The concentration of the azo-dye amaranth was increased from 10 to 55 mg L −1. The effectiveness was 90% and the rate of amaranth elimination was 1.136 mg h −1. The fluorescence in-situ hybridisation (FISH) revealed zones with high activity of Pseudomonas sp. Also increasing importance of the unculturable Pseudomonas sp. and the relationships in the biofilm were found. At the final stage of the experiment, a decrease of the azoreductase activity and an increase of the catechol-1,2-dioxygenase activity were established in the depth of the biofilter. The obtained results were linked with different Pseudomonas microstructures (shown by FISH). The obtained data showed that the changes in the biofilm structure occurred accordingly to the biodegradation of the toxic compound and it included the development of cooperative microbial relationships in the key genus Pseudomonas.