Chris Kenny, the county's director of public health, warned that a batch of the drug being circulated was three times stronger than normal.
He said the six who died were part of a drug rehabilitation programme.
Potential users as well as hospitals, pharmacies and GPs have all been alerted about the risk.
Mr Kenny said all of those who died within the past week had been on the "road to recovery" as part of the Crime Reduction Initiatives (CRI) programme.
He said: "We're aware there's some heroin circulating in the community that's two or three times the purity.
"What's happened is [CRI] service users have obviously been taking this and have inadvertently taken a level that is dangerous to them and in six cases they have died.
"We're treating it as a public health emergency."
Mr Kenny confirmed that Nottinghamshire Police was investigating the deaths and the CRI has begun an internal inquiry.
Drug users, their friends and families, can call a 24-hour hotline on 0115 896 0798 for advice about the drug.

The government agency has announced plans to test wireless power-transfer tech that it hopes to build under the country's motorways and major A roads.
It has already completed a feasibility study and is now asking companies to tender bids to host off-road trials.
But one expert questioned whether such a scheme would be cost effective.
Charge-as-you-drive technologies have already been pioneered elsewhere.
In 2013, the South Korean town of Gumi switched on a 12km (7.5 miles) route that allows buses with compatible equipment to be charged as they drive over it.
It works by a process called Shaped Magnetic Field In Resonance.
Electric cables buried under the road are used to generate electromagnetic fields, which are picked up by a coil inside the device and converted into electricity.
Last year, Milton Keynes also began use of a more limited scheme, which involves buses being wirelessly recharged via plates installed into road. In this case, however, the vehicles have to stop for several minutes at a time to receive the power boost.
"What has been committed to is that by 2016 or 2017 we will hold off-road trials - in other words not on a public road," Stuart Thompson, a spokesman for Highways England, told the BBC.
"It's still very early days. Where exactly the trials will be has yet to be determined."
Highway England says full details will be publicised once a contractor has been appointed.
It aims to run the experiments for about 18 months before deciding whether to commit itself to an on-road trial.
"The potential to recharge low emission vehicles on the move offers exciting possibilities," commented Transport Minister Andrew Jones.
"As this study shows, we continue to explore options on how to improve journeys and make low-emission vehicles accessible to families and businesses."
However, the director of Cardiff Business School's Electric Vehicle Centre of Excellence remains sceptical.
"It makes sense to try it out, and the technology does obviously work," commented Dr Paul Nieuwenhuis.
"But it sounds very ambitious to me. Cost will be the biggest issue and I'm not totally convinced it's worth it.
"Battery technology is increasing - if you look at what Tesla has achieved in recent years, it keeps adding more [travel] range to battery technology roughly every six months. So, it's not clear there's even a need for this."
Even if the plan ultimately comes to naught, Highways England is also committed to installing plug-in charging points every 20 miles (32.1km) on its motorway network over the "longer-term".

The alleged cyber-attack against the Houston Astros is thought to be the first time a professional sports team has been hacked by another.
Trade discussions and proprietary statistics were reportedly targeted.
Major League Baseball has confirmed the investigation.
Baseballs officials told the Washington Post that the breach is being taken seriously in the sport, which is known for its data-heavy approach to managing players and schedules.
The Cardinals said they were co-operating with authorities but did not comment further. The Astros said they would not comment while the investigation was ongoing.
The Cardinals, which currently have the best record in baseball, are one of the most popular teams in the sport.
They have won the sport's championship, the World Series, 11 times, last earning the title in 2011. Only the New York Yankees have won more.
The Astros and the Cardinals were divisional rivals in the National League between 1994 and 2012.
A "public health emergency" has been declared in Nottinghamshire after six people died in the county within a week after taking unusually pure heroin.
[NEXT_CONCEPT]
Motorists will be able to recharge their cars as they drive if a scheme being proposed by Highways England comes to fruition.
[NEXT_CONCEPT]
The FBI is investigating the St Louis Cardinals on charges that the US baseball team hacked into the computers of a rival club to steal player data, the New York Times has reported.