With the score goalless in Cuiaba, Dzeko - who is his nation's record goalscorer - saw his 21st-minute strike ruled out for offside, even though replays showed the decision had been incorrect.
|WORLD CUP SOCIAL HUB
|Keep up with all the latest news from Brazil and get involved in the debate on Twitter with our new World Cup Social Hub|
The defeat ensured that Safet Susic's men could not qualify for the second round after their earlier loss to Argentina.
Despite scoring the opener in his team’s 3-1 win over Iran in their final group game in Salvador, the Manchester City striker said he would always remember the disallowed goal against Nigeria, which marred Bosnia-Herzegovina’s maiden World Cup campaign.
"Despite the victory, we go home sad as we could've gone further," Dzeko said.
"The goal they cancelled out against Nigeria, I will remember until the end of my life."
Miralem Pjanic and Avdija Vrsajevic also scored against Iran on Wednesday, which handed the side their only victory in Brazil.
And Pjanic expressed his disappointment at his team not having progressed further in the tournament, insisting the players did not put in a good enough performance to beat Nigeria despite Dzeko’s disallowed goal.
"I'm glad I scored at the World Cup, but I am sorry that we did not achieve what we wanted," he said.
"If we had a bit more luck we could have got out of the group. We gave our best and it was a great experience for us. In the second game we did not work hard, but we have to look forward."