The invention discloses a control device for a PTZ camera with an altitude self-calibration function. The control device comprises a rail, a rail platform, a rail motor, the PTZ camera, a PTZ motor, a first sensor, a second sensor and an embedded microcontroller, wherein the rail platform is arranged on the rail and can slide along the rail; the rail motor is connected with the rail platform and provides power for motion of the rail platform; the PTZ camera is installed on the rail platform and can move along with the rail platform; the PTZ motor is connected with the PTZ camera and provides power for pitching and deflection of the PTZ camera; the first sensor is arranged on the rail platform and can move along with the rail platform; the second sensor is arranged on the PTZ camera and can pitch and deflect along with the PTZ camera; the first sensor and the second sensor are connected with the signal input end of the embedded microcontroller respectively, and the rail motor and the PTZ motor are connected with the output end of the embedded microcontroller respectively. The invention further discloses a control method. According to the control device and method, travel distance errors and deflection and pitching angle errors caused by mechanical abrasion, thermal expansion and cold contraction and other factors can be compensated, and altitude self-calibration is achieved.