Gen Lloyd Austin, head of US Central Command, said the withdrawal was a precondition for US-led air strikes, which began on Wednesday night.
The Iraqi military then launched a final push to drive IS from the city.
Iraq had asked the US-led coalition to mount air strikes on militants in Tikrit after the offensive stalled.
Gen Austin told the US Senate Armed Services Committee about 4,000 Iraqi army and federal police personnel were now carrying out "clearing operations" in Tikrit.
He said the operation to retake Tikrit had stalled partly because ground forces were not being properly controlled by the Iraqi government.
He added that the campaign had also lacked a coherent plan for ground movements.
The US had insisted on a better plan and the pullback of the militia as preconditions for its involvement, he said.
"Once those conditions were met - which included Shia militia not being involved - then we were able to proceed," he told lawmakers.
The operation to retake the city, about 160km (100 miles) north of Baghdad, began earlier this month with more than 20,000 soldiers, police and Shia militiamen from the Popular Mobilisation (Hashid Shaabi).
Tikrit was the hometown of the late Iraqi dictator Saddam Hussein.
The city fell to IS last June and its recapture is considered a key step towards driving the jihadist group from Iraq's second city of Mosul, to the north.
A US general says Iranian-backed Shia militia in Iraq are no longer leading the operation to recapture Tikrit from Islamic State (IS) militants.