RIO DE JANEIRO—Brazil’s President-elect Jair Bolsonaro, the ex-army captain who stormed to power Sunday, is poised to give the military its biggest role in the country’s government since the fall of the dictatorship more than three decades ago.

To the surprise of some voters, Mr. Bolsonaro spent much of his victory speech backtracking on his most extreme statements from decades past. He vowed to defend democracy after once saying in 1999 that only a civil war could solve Brazil’s problems, and promised to respect racial and...