Three types of SnO/SnO2 nanocomposites with different component ratios were synthesized using a simple hydrothermal process. Three samples, S1, S2, and S3, were produced by optimizing the occupied volume inside the Teflon flask, and are referred to as SnO2 rich, intermediate level, and SnO rich, respectively. In terms of degradation of malachite green under visible light, the photocatalytic activity of the S2 sample outperforms the other two samples and pure SnO by 30 %. It is attributed to the fact that the S2 sample has the most heterojunction between p‐type SnO and n‐type SnO2 of the three samples because the formation of p‐type SnO and n‐type SnO2 heterojunction in S2 prevents photogenerated electron‐hole recombination. By comparing S1 and S3 samples, we figured out that Sn2+ doped into the SnO2 lattice acts as an electron trap, slowing the recombination process and increasing photocatalytic activity.