In this study, N-doped straw biochar(N-BC) was prepared using urea for the removal of Pb2+, Cu2+, and Cr6+ from water. SEM, FT-IR, XRD, and XPS characterization analyses demonstrated the successful loading of N onto the biochar. The adsorption performance of the N-doped biochar was evaluated by orthogonal and single-factor experiments. The results showed that the magnitude of the effect on the adsorption of the three heavy metals was consistent with initial pH > dosing > pyrolysis temperature. In addition, the optimum initial pH for the adsorption of Pb2+, Cu2+, and Cr6+ was 5, 6, and 2, respectively. Compared to the single biochar, the adsorption of Pb2+, Cu2+, and Cr6+ by N-doped biochar increased from 6.33, 4.25, and 3.78 mg/g to 30.2, 16.28, and 14.53 mg/g. The adsorption of Pb2+, Cu2+, and Cr6+ followed quasi-secondary kinetics and the Langmuir model. Mechanistic studies showed that the adsorption mechanism of N-doped biochar for Cu2+ and Pb2+ involved surface adsorption, cation-pi bonding, and complexation, while that for Cr6+ included electrostatic attraction and reduction. The reusability and excellent adsorption properties of the surface N-doped biochar from cycling experiments indicate that biochar is a good material for the removal of heavy metals from water.