The initiative, which will run for the next year at Edinburgh Royal Infirmary, could boost the number of transplants across the country by more than 10%.
It is expected to increase the number of donors whose organs are viable for transplant by between five and 10.
Compared with last year, when organs became available from 80 donors across Scotland, the Edinburgh pilot could mean a 12.5% increase in life-saving organ transplants.
Each donor can save up to seven lives by passing on organs such as the kidneys, liver, heart, pancreas and small bowel after death, meaning an extra 70 lives could be saved by the project.
Previously, anyone who suffered a cardiac arrest either at home or in the community has not been able to donate their organs, even if they had made it clear they wanted to be an organ donor, because of a delay in preparing them for transplant.
At present, only patients already in intensive care at the time of their death are suitable for organ donation.
This is because the systems are already in place to consult with their families and progress rapidly to harvesting their organs and distributing them to patients on the waiting list.
However, under the Edinburgh pilot, people who suffer heart attacks outside hospital but are revived by paramedics and admitted to accident & emergency will be able to donate their organs if they subsequently die.
Patients must be between 16 and 60 and it will operate from 9am to 5pm weekdays. It will not apply to those who die outside of hospital.
Dr Matt Reed, consultant in emergency medicine at the Royal Infirmary of Edinburgh, said modern resuscitation techniques practised at the hospital and by ambulance crews had resulted in survival rates for these patients improving dramatically, with many more victims making a recovery.
He added: "Unfortunately there are some patients who do not survive despite every attempt to save them.
"Many will have expressed a wish to be an organ donor by joining the donor register in the expectation their wishes be respected. This will allow their wishes to be acted upon."
There were 346 organ transplants in Scotland last year, but statistics show 495 people were awaiting a new kidney as of September last year and 59 needed a new liver. Twelve Scots required a heart transplant, 20 a lung transplant and one needed both heart and lungs.
Public health minister Michael Matheson said: "When all attempts at resuscitation in hospital have been unsuccessful it can be a source of comfort to the family to be able to respect the wishes of loved ones who have made their organ donation wishes known by joining the NHS Organ Donor Register.
"This pilot programme is about doing this."
Dr Jean Turner, the executive director of Scotland Patients Association, said it "offers patients and relatives the utmost assurance for the best outcomes from resuscitation with consideration and respect when organ donation may become an option for them".