Glauco and Gleison Ferreira, eight and six, got lost trying to catch small birds in the jungle near Manicoré, Amazonas state, on 18 February.
A local tree cutter found them by chance on Tuesday.
They are expected to make a full recovery after being treated in hospital for malnourishment.
After the boys disappeared, hundreds of residents spent weeks looking for them.
But lost during the rainy season of the Amazon – a time which makes walking and moving in the jungle even more difficult than usual – they were nowhere to be found.
Emergency services decided to call off the search on 24 February, but locals continued to search for the boys, according to local media outlet Amazônia Real.
Almost four weeks later, the boys were found by a man cutting wood 6 km (3.7 miles) from the village of Palmeira in the Lago Capanã protected land reserve where the boys live with their parents, Amazônia Real adds.
One of the boys shouted for help when he heard the local man hitting the trees nearby. Following the calls, the man found the two boys lying on the rainforest floor, hungry and weak, with many skin abrasions.
According to local media, the two boys told their parents they had eaten nothing while lost and had had only rainwater to drink.
Upon their discovery, Glauco and Gleison were sent to a regional hospital in Manicoré, before being transported by helicopter to another hospital in Manaus on Thursday morning, Globo reports.
This is not the first time people have gotten lost in the Amazon rainforest.
In January last year, pilot Antonio Sena spent 36 days lost in one of the remotest parts of the Brazilian Amazon after his aircraft crashed.
In 2008, Amazônia Real reports an indigenous 18-year-old was lost for 50 days in a remote area of the Amazon after going hunting, and died shortly after he was found.