Due to the special meshing of convex and concave tooth profiles, an S-shaped tooth profile gear with a few teeth has the advantage of reducing the contact stress and improving the contact ratio. However, the theoretical inseparability of the center distance of an S-shaped tooth profile and shaft misalignments, including center distance errors and axis parallelism errors caused by manufacturing or installation errors, can easily cause tip contact and produce transmission errors. Accordingly, it is necessary to analyze the influence of shaft misalignments on the meshing performance. In this paper, a unified mathematical model of spur and helical gears with an S-shaped tooth profile is established and an analytic method for determination of the contact pattern, meshing path, and transmission error of a gear pair with shaft misalignments is proposed. Then, the validity of the analytic method is proved by practical examples and the influence of shaft misalignments on the contact pattern of an S-shaped tooth profile gear pair is obtained. Through comparison with an involute gear with the same parameters, it is found that shaft misalignments within a certain range result in an acceptable transmission error and contact area migration of the S-shaped tooth profile gear pair similar to that of the involute gear pair.