The remains, thought to date back to the 13th century, were discovered during installation works at a top private school in Scotland.
The bones were buried less than two feet underground in the quad area of the site and are now being examined by experts with a view to being reburied.
Robert Gordon University, in Aberdeen, ordered the boiler work - but the skeletons were discovered in the grounds of the neighbouring private school Robert Gordon College.
Contractors installing cables found the first skeleton near Schoolhill main library and called in Aberdeenshire Council archaeologists to carry out further excavations in the area.
It is believed the skeletons are of people laid to rest on the site of the former Blackfriars Abbey during the 13th century.
The abbey was founded between 1230 and 1249, purportedly by Alexander II, but was destroyed by reformers in 1560.
It was granted to George, Earl Marischal in May 1587 and went on to become the Schoolhill site for the college after being opened in 1750.
Now Aberdeenshire Council archaeologists have removed the recently discovered remains and are preparing a report on the excavation.
The facilities manager for Robert Gordon’s College, Michael Maitland, said the find could be “major”.
He said: “Contractors basically were working to install lines and lay cables when they made the discovery.
“They were using a mechanical digger and with the first scrape, about 300 millilitres below ground, they found a skeleton.
“The first one was near the Schoolhill main library and we called the council archaeologists.
“They went on to find about 25 from around the 13th century, according to the archaeologists.
“They were saying they consider it to be quite a major discovery that they believe is tied to the old Blackfriars Abbey on the site.
“I’ve worked here 25 years and I never imagined there was all this just a couple of feet below me. It’s fascinating.”
Diane Morgan, a local historian, said the Roman Catholic abbey was abandoned during the upheavals of the Protestant Reformation and was left in ruins.
She said: “At the time the friars from both Blackfriars Abbey and Greyfriars were kicked out of the city and the abbeys left in ruins.
“This find is very interesting and in the 13th century people could pay money to be buried on sanctified grounds.
“This could mean the people were privileged.”
A spokeswoman for Robert Gordon University said disruption had been “minimal” and work was continuing on the boiler project.
She said: “During excavation work that was being carried out at our Schoolhill campus to install a new boiler plant, a number of skeletons were discovered on the site.
“As a result, we have been working closely with the archaeology team at Aberdeenshire Council to progress the work in accordance with their guidance.”