Based on the first‐principles calculation of density‐functional theory, the electronic structure and magnetic properties of hexagonal boron phosphide (h‐BP) with doping and applying strain to the transition‐metal (TM = Cr, Mn, Fe, Co, and Ni) elements are investigated. After the TM elements are introduced, the magnetism is induced. The magnetic moments are 3.00, 3.87, 1.00, 1.99, and 1.00 μB, respectively, which mainly contributed by the 3d orbitals of TM elements. In the case of magnetic coupling, Cr–Cr are mainly coupled antiferromagnetically at different distances. In addition, Fe–Fe performs a ferromagnetic state, and Co–Co represents an antiferromagnetic state with the distance of 3.213 Å. After applied strain, Co doped of the system shows the characteristics of semimetals under the application of 4% strain. It can be added that for h‐BP systems, doping Co and Mn increases its conductivity, which is beneficial to the study of spintronic materials.