Officers arrived at the Northwest Detention Center early Saturday after a report the man -- armed with a rifle -- had set a car on fire and had attempted to ignite a large propane tank, the city police department said in a statement, Presstv Reported.
The man, who was carrying flares and a satchel bag in addition to his weapon, died of gunshot wounds after officers arrived on the scene, police added.
The assailant was identified by police as 69-year-old Willem Van Spronsen.
He had previously been convicted of obstructing a police officer after an altercation during a protest outside the facility last year, according to local media reports.
None of the officers involved in the shooting was injured. All four men were placed on administrative leave in line with regular department policy, police said.
Immigration has been the subject of a divisive political battle in the US, which has struggled for more than a year with a migration crisis on its southern border as thousands of people travel to the US each month.
Demonstrators across dozens of US cities protested against nationwide raids planned for Sunday that President Donald Trump has promised would lead to the mass expulsion of undocumented immigrants.
GEO Group, which operates the Tacoma center on behalf of the Department of Homeland Security, said reports of overcrowding and the detention of unaccompanied minors at other immigration centers had endangered its staff.
"The outrageous and baseless accusations that have been leveled against our facilities have led to misplaced aggression and a dangerous environment for our employees," the company said in a statement.
"We are thankful for the quick and brave action by the Tacoma Police Department, which prevented innocent lives from being endangered."
Police said operations at the facility had returned to normal.