In the adsorption process, the adsorbent structure and its interaction with wastewater are the main determinant of the process efficiency. For this reason, the correct selection of the production conditions for the produced adsorbents is critical. In this study, the reaction time and the concentration of acid, oxidant, substrate, and monomer were selected as independent variables which effect the structure of the polyaniline based composite material. These production variables of polyaniline/beidellite (PANI/BEI) composites were designed by response surface methodology (RSM). According to RSM, 46 different PANI/BEI composites were synthesized and were used as an adsorbent in the removal of acid yellow 194. Thus, the optimum PANI/BEI production conditions were determined. After the identification of the optimum PANI/BEI production conditions, the effect of adsorption conditions such as pH, mixing time, and dye concentration were studied by batch experiments. The maximum adsorption capacity was obtained as 123 (mg g(-1)) at the T = 25 A degrees C, t = 24 h, pH 3, = 0.15 g adsorbent, = 50 ml dye solution, and = 200 rpm. The results presented in this study revealed that the central composite design is a suitable method to optimize the production conditions of PANI/BEI and the prepared PANI/BEI composites has an important potential as an adsorbent for the removal of metal-complex dyes such as AY194. In addition, the polymerization of aniline and the removal of dye were confirmed by different analytical techniques such as BET, XRD, SEM, and EDAX.