Boron nitride (BN) has applications in a number of areas: it can be used as lubricant, as insulating thermoconductive filler or UV-light emitter. BN can also capture large amounts of hydrocarbons and gaseous molecules, provided that it exhibits a porous structure. This porous structure also enables its application as a drug-delivery nanocarrier. Little if anything is known on controlling the porosity of BN, even though it has tremendous implications in terms of adsorption performance and drug delivery properties. To address this aspect, we provide for the first time an in-depth investigation of the effects of the synthesis conditions on the formation of porous BN. The material was also tested for CO2 capture. We found that the intermediate preparation is of paramount importance and can in fact be used to tune the porosity of BN. Owing to a combination of spectroscopic and thermal analyses, we attributed this phenomenon to the variation of the thermal decomposition pattern of the intermediates. The most microporous BN produced was able to capture CO2 while not retaining N2. Overall, this study opens the route for the design of well-controlled porous BN structures to be applied as adsorbents and drug-delivery carriers