The selective recovery of gold from wastewater is necessary because it is widely used in various fields. In this study, a new polymeric adsorbent (TP-AFC) was prepared by modifying polyaniline with trimethyl phosphate for the selective recovery of gold from wastewater. Bath experiments were carried out to explore the adsorption capacity and mechanism. The optimum pH of adsorption is 4. The adsorption equilibrium is reached at 840 min. The maximum adsorption capacity is 881 mg/g and the adsorption was a spontaneous endothermic process. The adsorption process fitted well with pseudo second-order kinetic and the Langmuir-models. The single-layer chemisorption governed the adsorption process. In addition, the application in wastewater indicated that the interfering ions had no effect on the adsorption of gold ions. TP-AFC has good selectivity. The interaction mechanism was mainly ion exchange and complexation. In general, TP-AFC was successfully prepared and has an excellent future in practical application.