The weapon had fallen into cushions as a shopper sat down to test the sofa at the store in a suburb of the state capital, Indianapolis.
Nobody was hurt in Monday's incident and no arrests have been made. Ikea said it had expressed "sincerest apologies" to the child's family.
Police say the gun-owner did not notice he had dropped his firearm.
"He sat down and somehow or another it became dislodged from this body and when he got up he didn't realise that he was without it," Tom Weger of the Fishers Police Department told the Washington Post.
The owner continued shopping and only became aware he had lost his gun when he heard gunfire.
The child fired one shot into a sofa cushion after "just a few minutes" of playing with the weapon, Mr Weger added.
"As soon as he realised there was a commotion in the store, the gun-owner quickly identified himself.... and fully co-operated with the investigation," he continued.
In its statement, Ikea said the "safety and security of customers and co-workers is the top priority".
Ikea "has a no-weapon policy in our locations to prevent exactly these types of situations," their statement continued.