Returning Hales helps England win their first game on Pakistan soil in 17 years
Debutant Luke Wood also claimed 3-24 as England took a 1-0 lead in the seven-match series which will serve as a build-up for the T20 World Cup in Australia in October and November.
Chasing 159 for victory in Karachi, England reached their target with four balls to spare as Hales' 58 at the top of the order in his first appearance for the team since 2019 and Brooks' 25-ball knock at the end of the game got them home.
Asked to bat first after losing the toss, Pakistan rode on opener Mohammad Rizwan's 68 and skipper Babar Azam's 31 to post 158-7 in their 20 overs as Wood and Adil Rashid (2-27) did all the damage to restrict the home side.
"Brilliant performance," said England skipper Moeen Ali. "We pulled the game back really well.
"A lot of praise to the bowlers who set it up nicely for our batters. Crucial wickets around the 10th over made a difference. It wasn't an easy wicket for the new batters.
"Luke Wood and Adil Rashid were excellent."
Pakistan skipper Azam said his batters had to do better in the remainder of the series.
"The way we played the first Powerplay was great," Azam said. "After 10 overs, there was a swing of momentum, which you have to credit England for.
"We didn't have enough big partnerships. Our batters need to step up."
England, who last toured Pakistan in 2005, play four matches in Karachi and three in Lahore before returning in December to play three tests in the second leg of the tour.
International teams have largely refused to tour Pakistan since an attack by Islamist militants on the Sri Lankan team bus in Lahore in 2009 killed six policemen and two civilians.
England pulled out of their Pakistan tour last year soon after New Zealand had abandoned their tour of the country over security concerns.