The attack, which took place in the Tal Abu Jrad area near Baiji wounded one of Obaidi's guards, the defence ministry said in a statement.
A defence ministry official told AFP that Obaidi himself was unharmed.
The minister was touring the area to oversee military operations in Baiji, which was seized by the Islamic State jihadist group last year, retaken by the government but then lost to the jihadists again.
It was not immediately clear if the attack was actually aimed at Obaidi, or just a militant firing on a target of opportunity.
More From This Section
Holding Baiji, located on the road to IS hub Mosul, would eventually be a strategic asset for Iraqi forces, but an operation to retake Iraq's second city from the jihadists is currently a distant prospect.
Baiji is also located near the country's largest oil refinery, but the massive facility has been wrecked in fighting between government and IS forces.
The attack on Obaidi's convoy is just the latest in a long string of cases in which senior officials and officers have been exposed to bombings or shootings during battles against IS.
The Anbar governor was wounded in 2014, while senior army and police commanders have also been killed in other provinces.