The invention provides an air conditioner control method and system based on a PID algorithm. The air supply temperature, the air returning temperature and humidity of an air conditioner in a machine room are collected; according to the air supply temperature, the air returning temperature and the preset machine room temperature, the starting frequency and the starting time of a compressor in the air conditioner are controlled; the incremental PID algorithm is utilized, and according to the temperature difference value between the air supply temperature and the air returning temperature and the preset machine room temperature, the optimal output frequency of the compressor is calculated; meanwhile, according to the optimal output frequency of the compressor, the optimal rotating speed of a draught fan is adjusted; the compressor is controlled to carry out cold amount output at the optimal output frequency, and the draught fan is controlled to rotate at the adjusted rotating speed. According to the method and system, a frequency converter adjusts the rotating speed of the compressor, the air conditioner outputs the smaller cold amount, balance of the cold amount and the heat amount in the machine room is achieved, the starting and stopping frequency of the compressor is reduced, the running energy consumption of the compressor is reduced, and therefore the air conditioner runs in a more energy-saving manner.