The purpose of this study was to design an objective method for measurement of head positions as achieved with use of a microelectromechanical systems (MEMS) sensor. In addition, to use this system to observe the abnormal head position (AHP) in patients with congenital superior oblique palsy (SOP) before and after their surgery. An MEMS sensor was designed for recording of the pitch, roll, and yaw values of the head position in real time. The MEMS sensor was then fixed on the synoptophore from -30 degrees to +30 degrees positions horizontally and vertically to test the accuracy of these measurements. Then, we tested 13 participants with AHP using the MEMS method and the photographic method and compared their correlations. Finally, the pitch, roll, and yaw values of head positions were measured using this MEMS sensor in 31 patients with congenital SOP as performed before and after their surgery. The MEMS sensor (LPMS-B2; Alubi, Guangzhou, China; 400 hertz [Hz]), as based on the theory of a gyroscope, was designed and connected to a smartphone via Bluetooth. It was able to conveniently record the patient's pitch, roll, and yaw head positions in real time, recordings which were consistent with the scales of the synoptophore (P > 0.05) and good correlations with the photographic method (P < 0.001). The main preoperative AHP in patients with SOP was roll (22/31, 71%). Pre- and postoperative vertical deviations were 16.4 ± 7.3 prism diopters (PD) and 4.1 ± 4.2 PD, respectively (P = 0.001). The AHP in patients with SOP was positively correlated with the angle of extorsion in the dominant eye (P = 0.01), rather than that of the vertical deviation. The MEMS sensor described in this report is a simple, practical, and accurate objective device for use in head position measurements. In patients with SOP, the AHP is related to the angle of extorsion in the dominant eye. The MEMS sensor was designed as a micro-wireless dynamic high-precision device for AHP measurement, which has the potential for use in a clinic.