The Scottish Fire and Rescue Service, police and utilities companies went to the scene in Queen Anne Street after the alarm was raised at 12.14am.
It is thought the blast, believed to be under a man hole cover, may have been caused by a problem with electric ducting.
There were no reports of any casualties.
Traffic in the area was disrupted as roads were closed while emergency services dealt with the incident.
Stagecoach East tweeted it was unable to serve Dunfermline Bus Station while the incident was dealt with.
Police said they are investigating the incident along with other agencies.
A police spokesman said: “Police in Fife have been made aware of reports of explosions occurring underground in the Queen Anne Street area of Dunfermline around 12.10pm on Tuesday May 15.
“Officers are currently liaising with the Scottish Fire & Rescue Service and utility companies to establish the full circumstances surrounding this matter.
“Local road closures are currently in place while work is carried out to ascertain the cause of the explosions and ensure the safety of the public.”