Dramatic footage shows the moment one of the boys hangs from a window in Grenoble, south-eastern France, as black smoke rises from his home.
He then runs into a crowd who shouted at him to jump.
A second boy then jumps out of the building before being caught by the group.
The boys, aged 3 and 10, were taken to hospital with 17 residents of the building after inhaling smoke.
Four people who caught the boys were also checked by doctors.
There was no immediate word on the condition of the boys or anyone else affected by the fire.
Souhaila Saidi, who lives in a neighboring apartment, said she was “anxious and stressed” when she saw the children preparing to jump.
She said: “Fortunately, they jumped one after the other without being seriously injured. ”
Eric Piolle, the mayor of Grenoble, congratulated the inhabitants for the “heroic rescue” of the two children before wishing a speedy recovery to those who were injured during the rescue.
Mr. Piolle wrote on Facebook: “Hand in hand, they allowed the two little ones to come out of this tragedy unscathed. “