Walterio Goncalves had gone to dress his brother Valdelucio's body in a burial suit when he saw the body bag was moving.
Doctors at Menandro de Farais General Hospital in Salvador, Brazil, had told the family that the 54-year-old had passed away the previous night.
But Walterio soon realised there had been a horrible mistake. He was quoted in the Daily Mirror saying: "I went crazy and shouted for the medical team so they could see what was happening. They checked him and confirmed that he was still alive."
Valdelucio, who is suffering from stomach cancer, first arrived at the hospital over the weekend after enduring breathing difficulties. Medics had called the family to inform that he had lost his battle after dying from respiratory and multiple organ failure.
Niece Patricia Cintra explained: "It was a shock to all of us when they called to tell us he had passed away. But we started making the funeral arrangements."
By Sunday, they had booked the funeral, purchased the coffin and even paid for his death notice in a newspaper.
Luckily for Valdelucio, his brother's visit meant someone realised that he was still very much alive.
The poor man was rushed back to the intensive care ward, but his family have since insisted on moving him to another hospital
Unable to speak, he wrote a note saying that he believes that Blessed Irma Dulce – a Brazilian saint known for her miraculous powers – has brought him back from the dead.
He said: "I saw death at my feet but my faith was so great that I was cured. Before Irma Dulce I said, 'do a miracle in me', and she heard my prayer."
Margarida Mirando, the director of the hospital, confirmed that bosses are investigating the situation.
Reveal is now on Google Plus! Join us here for the latest pictures, fashion and celebrity news!