Optical microfibers functionalized with surface microstructures, have attracted great attentions and been widely used in various optical devices. In this work, we demonstrated a technique to fabricate microstructures on polymer coated optical microfibers via ultraviolet inscription. Optical microfibers were firstly functionalized with ultraviolet photosensitivity by surface PMMA jackets. Microstructures were fabricated on optical microfibers via point-by-point ultraviolet inscription since the photo-etching in PMMA jackets. As an illustration, a 2-mm-long microfiber long period grating (MLPG) with a pitch of 80 μm was inscribed. The diameter of optical microfiber is 5.4 μm and a resonant dip of 15dB was observed at 1377 nm. The MLPG showed a high sensitivity of strain and axial force, i.e., -1.93 pm/με and -867 μN/nm. Sealed by a PMMA housing, the temperature sensitivity of MLPG could be enhanced from -12.75 pm/°C to -385.11 pm/°C. This technique demonstrates ultraviolet inscription of MLPGs and also provides an approach to fabricate microstructures on optical microfiber via ultraviolet exposure.