West Yorkshire Police said officers had been called to the demolition site of the old Bishopgarth Police Training School on Saturday afternoon.
The force had received reports of people on the roof of the old high rise building in Westfield Road.
A Wakefield Central Policing Team spokesman said: "Officers attended, located and dealt with the suspects.
"Not only is it an offence to be on the enclosed site, there are also risks from broken glass, sharp metal work and high falls. There is also still the issue of asbestos within the site.
"Fortunately, there were no injuries on this occasion."
The site became redundant when the force moved training to its new facilities in Carr Gate, Wakefield, in 2014.
It is now earmarked for housing, with up to 150 news homes potentially being built there.