O'Keefe, 32, was left out of Australia's original squad in favour of the younger left-arm spinner Ashton Agar, triggering speculation of an imminent end to his career.
O'Keefe will replace fast bowler Josh Hazlewood who has been ruled out of the series after picking an injury on the third day of the first Test in Dhaka On Tuesday.
Hazlewood, who bowled just seven deliveries, will return home after the Test.
"With Jackson Bird in the squad we are comfortable with our fast-bowling options for the second Test and have elected to add an additional spinner given the conditions we are likely to face in Chittagong," national selector Trevor Hohns said in a statement.
O'Keefe impressed during this year's four-Test series in India, taking 19 wickets, including a match-winning 12-wicket haul in the first Test in Pune in February. Australia lost the series 2-1.
The selectors also brought in fast bowler Kane Richardson to replace Hazlewood in the squad for the one-day international five-match series in India from September 17 to October 13.
ashton agarBangladesh vs Australia 2017David WarnerJackson BirdJosh Hazlewoodkane richardsonSteve O'Keefesteve smith
First Published: August 30, 2017, 1:00 PM IST