Photochemical decarboxylation of 9-(1,3-dioxo-1,3-dihydro-isoindol-2-yl)-non-4-ynoic acid, 12-(1,3-dioxo-1,3-dihydro-isoindol-2-yl)-dodec-5-ynoic acid, 14-(1,3-dioxo-1,3-dihydro-isoindol-2-yl)-tetradec-12-ynoic acid and 16-(1,3-Dioxo-1,3-dihydro-isoindol-2-yl)-hexadec-5-ynoic acid yield N-heterocycles in moderate yields. The macrocyclic compounds were obtained by photolysis at 300nm varying the chain length and the position of triple bond of the starting materials. With the short methylene chain in $\omega$ -phthalimidoalkynoate, it was difficult to obtain the cyclized product but as the methylene chain gets longer and the triple bond is placed far away from the phthalimide group, the photocyclized products were obtained in moderate to fair yields.