Oxide materials offer a wide range of interesting physical and chemical properties.Even more versatile behavior of oxides is seen at the nanoscale, qualifying these materials for a number of applications. In this study we used DFT calculations to investigate the physical and chemical properties of small hexagonal MgO nanotubes of different length. We analyzed the effect of Li, B, C, N, and F doping on the properties of the nanotubes. We find that all dopants favor the edge positions when incorporated into the nanotubes. Doping results in the net magnetization whose value depends on the type of the impurity. Using the CO molecule as a probe, we studied the adsorption properties of pristine and doped MgO nanotubes. Our results show that the dopant sites are also the centers of significantly altered chemical reactivity. While pristine MgO nanotubes adsorb CO weakly, very strong adsorption at the dopant sites (B-, C-, and N-doped nanotubes) or neighboring edge atoms (Fand Li-doped nanotubes) is observed. Our results suggest that impurity engineering in oxide materials can be a promising strategy for the development of novel materials with possible use as selective adsorbents or catalysts.