This work reports the synthesis of thiazolidin‐4‐ones and thiazinan‐4‐ones analogous to rosiglitazone, a potent antidiabetic drug. The desired compounds were synthesized with moderate to good yields by one‐pot reactions between different primary amines, mercaptoacetic or mercaptopropionic acids, and the 4‐(2‐(methyl(pyridin‐2‐yl)amino)ethoxy)benzaldehyde. The cyclocondensation reactions were carried out for 20 h, and all the products were characterized by 1H and 13C nuclear magnetic resonance spectroscopy, mass spectrometry, and one example by X‐ray diffraction.