The officer, a member of the East Chicago Police Department, was shopping at a Walmart in Hobart with his wife and kids on Sunday when a shooter inside began firing, according to police.
Hobart police and fire departments responded to the shooting and found that the East Chicago officer had taken a male suspect into custody without incident, Hobart police said in a statement.
A woman who was with the alleged shooter was also taken into custody, according to the statement.
Hobart officers discovered one victim, a man, with a gunshot wound. His condition was not immediately clear.
East Chicago police praised the officer's heroism.
"Thanks to his quick thinking and heroic actions the suspect involved in this senseless shooting was taken into custody without further incident," police said in a statement.
Hobart police said they are actively investigating the incident to determine a motive but believe the shooting stemmed from an altercation between the suspect and people he knew.