In this study, biosorption of cadmium (Cd) (II) and zinc (Zn) (II) ions from synthetic wastewater was investigated using Lactarius piperatus macrofungus biomass in batch conditions. The presence of amino, carboxylic, sulfonate, and phosphate groups was identified along with shifts and decreased intensities of the main peaks (Fourier transform infrared spectroscopy), and deformations of macrofungus cell walls after heavy metals biosorption (scanning electron microscopy) were observed. The effects of stirring rate, biomass quantity, initial metal ion concentration, contact time, pH, and temperature were studied. The optimum parameters were established as follows: 700 rpm, 2 g (for Cd) and 5 g (for Zn) biosorbent, pH in the range of 5.49–5.72, and 296 K. By comparing various kinetic models, the biosorption process was found to follow the pseudo‐second‐order kinetics. Isotherm models were tested using linear and nonlinear (Covariance Matrix Adaptation Evolution Strategy optimization algorithm) regression analyses. Maximum adsorption capacities calculated using Langmuir isotherm were 10.65 mg/g for Cd (II) and 7.54 mg/g for Zn (II). Results also showed that nonlinear regression analysis has better performances, with Sips model, describing process the best. The results indicated that L. piperatus can be used as a cost‐effective biosorbent for the removal of Cd (II) and Zn (II) ions from aqueous solution. © 2013 American Institute of Chemical Engineers Environ Prog, 33: 1158–1170, 2014