A swing mechanism for a construction machine is provided with a center frame 3 having a pinion insertion hole 3c, an inner race having an internal gear and mounted on a side of an undercarriage, an outer race 1b rotatably arranged surrounding the inner race and provided with the center frame secured thereon by bolts 8a, a pinion maintained in meshing engagement with the internal gear of the inner race, and a pinion drive device. A pin fit-in hole 3d arranged in the center frame 3 such that a knock pin 6 fixed on the outer race 1b is fitted in the pin fit-in hole to position the center frame 3. To arrange the pin fit-in hole 3d in the center frame 3, a pin fit-in hole portion 20 through which the pin fit-in hole 3d is formed is locally arranged such that the pin fit-in hole portion 20 extends toward the pinion insertion hole 3c to have a center of the pin fit-in hole 3d located on a center connection line S. This construction allows to perform smooth assembly of the pinion drive device while enabling to optima