Graphene is a two-dimensional material that has special characteristics. The electronic properties of graphene show zero band gap conditions. The magnetic properties of graphene can be created by modifying the electronic properties through atomic substitution. In this research, we study the magnetic and electronic properties of single-layer graphene substituted with boron (B) atoms, because it has almost the same atomic radius as carbon (C) atoms, resulting in only small lattice deformation. The spin-polarized density functional theory (DFT) method implemented in the Quantum Espresso package was selected to perform the calculations. The simulated models are a 4×4×1 supercell of pristine graphene structure consisting of 32 C atoms and boron-substituted graphene with a variety number of atoms (B = 1 and 2 atoms). The results of band gap energy obtained after the structure was optimized are 0.19 and 0.21 eV (spin-down and spin-up) for G-B and 0.36 and 0.37 eV (spin-down and spin-up) for G-2B. Boron substitution in graphene opens the bandgap and shifts the Fermi energy level. It also influences the magnetic moment of the graphene layer, estimated at 0.22 and 0.06 μB/cell for G-B and G-2B, respectively. This research shows that modifying graphene by substituting boron makes the graphene material semiconductive and weakly magnetic.