In this paper, we proposed a method to fabricate a D-shaped optical fiber of Bragg surface grating filter component by D-shaped fiber polishing along with photolithography、holographic interference lithography technologies and micro-molding process. The optical fiber was side-polished until it reaches the core of fiber. The master Bragg grating was first fabricated on the positive photoresister by using the holography interference lithography, then the patterned resist was used as a mother mold to transfer the pattern onto a hard polydimethylsiloxane (hPDMS)/ polydimethylsiloxane (PDMS) mold. The gratings pattern on hPDMS/PDMS was then transferred onto the UV polymer on the surface of a D-shaped fiber using a UV replication process. The transmission spectra of the resulting gratings were measured, with test results showing the transmission dip of -17dB , and 3-dB-transmission bandwidth of 9nm.