The discovery of two-dimensional semiconducting materials, a decade ago, spawned an entire subfield within solid-state physics that is focused on the development of nanoelectronics. Here we present a new class of semiconducting two-dimensional material based on hexagonal MgB 2 . Although MgB 2 is a semimetal, similar to the other well-studied transition metal diborides, we demonstrate that, unlike the transition metal diborides, thinning MgB 2 , to create nanosheets, opens a band gap in the density of states. We predict that a 7 Å thick MgB 2 nanosheet will have a band gap of 0.51 eV. MgB 2 nanosheets differ from other two-dimensional semiconductors in that the band gap is introduced by (001) surfaces and is opened by the quantum confinement effect. The implications of these findings are that nanostructured MgB 2 is not merely a new composition, but also has intrinsic mechanisms for tuning its electronic properties, which may facilitate the development of nanoelectronics.