Can he marry her in Brazil and start the procedure to bring her back at some point?
Or can any one suggest the best way to bring her back as they love
Yes - he can go to Brazil and marry her - subject to local laws of course.
They would then apply for a spouse visa (around £700) in Brazil showing that they are married, and he can support her without additional public funds, which would give her 2 temporary years in the UK. At the end of those 2 years (assuming immigration rules don't change) she could apply for indefinate leave and then a year later Citizenship.
The standard rules on bans due to deportation/removal don't apply when applying for a spouse visa. However, there is a catch-all rule number 320(11) which allows the ECO to deny the visa if the applicant has seriously frustrated the immigration rules. Overstaying, illegally working and needing to be deported might well come under that.
There is a second option which might get around that rule. Your friend could move to an EU country, exercise his treaty rights for 6 months (working/studying), and bring her over on a family permit. Once she was in on that rule and it was confirmed he had exercised his rights (hence the time frame), then they could return to the UK and live happily under EU rules instead. The road to permanent settlement is longer under this, but it might get around the ban.
Final option - your friend could move to Brazil if he's serious about being with her.
M.