We demonstrate lasing in two-dimensional Thue-Morse structures fabricated in a semiconductor membrane. By changing the relative size of two scatterers that correspond to the building blocks A and B, we gradually vary structural aperiodicity and find an optimal degree of aperiodicity where light confinement is maximal and lasing is the strongest. At various degrees of aperiodicity, different types of modes acquire the highest quality factors and may be selected for lasing. This work opens a way of controlling lasing characteristic via structural aperiodicity. (C) 2011 American Institute of Physics. [doi:10.1063/1.3592850]