One challenge for the realization of electrically drive nano-photonic devices is the formation of metal contacts and passivation. In this paper, we report a novel self-aligned method suitable for the formation of the metal contact and passivation for submicron photonic devices. Two different dielectric materials with high selectivity in wet chemical etching and a wet etching of semiconductor to create an undercut are involved. The whole process is completely compatible with existing compound semiconductor process. As a demonstration of this method, the fabrication and characterization of an InGaAsP/InP submicron-ridge waveguide lasers is presented. The method is extendable to high aspect ratio-submicron ridge waveguide and other device fabrication.