The blast happened in the basement of Celsa Steel UK on East Moors Road in Splott at 10:30 GMT on Wednesday. Four others were injured and taken to the city's University Hospital of Wales while a fifth was treated at the scene.
A spokeswoman for Celsa said thoughts were with the dead workers's families and it was working with the police and Health and Safety Executive (HSE) to find out what happened.
Eyewitnesses told BBC News of the moment the explosion happened - with some feeling the blast from half a mile away. Many saw thick black smoke billowing across the site. Rob Edwards from the union Community said the explosion happened in an oil accumulator in the rod and bar mill.
Keith Dunn, chief executive of St John Cymru Wales, which trains first-aiders at the plant said: "I was interviewing some staff this morning and we heard a loud bang. The building and the windows shook."
Mr Dunn added: "Obviously our thoughts are with them and we will be making contact with the company to see if we can offer assistance."
Another witness, Jordan Willis, said he heard a "bang" and "felt the explosion through the floor". Martin Davies, who works near the site, recalled hearing "one hell of a bang".
His colleague Peter Sestanovich said: "We heard a big bang and a rumble through the floor and we saw black smoke billowing over the top of buildings."
Lee Canning, director at a delivery firm on East Moors Road, added: "It sounded like a car bomb, to be honest with you."
Helen Vernon, who works at nearby Busy Bee's nursery, said: "I went outside and a PCSO (Police Community Support Officer) said there's been a big explosion. That's all they could tell me.
"We heard this really loud bang. A colleague of mine, who was in the staff room, told me the ceiling shook." Eight appliances from South Wales Fire and Rescue attended, along with several ambulances.
The site was evacuated and the injured were treated at the scene or taken to hospital. Two people were initially unaccounted for and a specialist police search unit was brought in.
Shortly before 17:00 GMT the bodies of two workers were discovered. Supt Stephen Jones said: "We've informed the families and are continuing to support them at this difficult time.
"Our priority at this moment in time is to recover the victims, support their families and carry out an investigation to find out what's occurred here today."
Roy Rickhuss, general secretary of the steelworkers' union Community, said: "This is absolutely tragic news and our immediate thoughts are with the families and colleagues of those who died and those who were injured.
"Lessons will need to be learnt from what happened so that this cannot happen again but for today we should be focused on supporting everybody affected." First Minister Carwyn Jones said he was "deeply saddened" at the news and commended the work of the emergency services.
Secretary of State for Wales Stephen Crabb said it had been a "truly devastating day" and the incident had "touched us all". A spokeswoman for Celsa said: "It is with great sadness that we can confirm that two colleagues have passed away and four have sustained minor injuries.
"Our thoughts and deepest sympathies are with those affected and their families, who have been informed."
She went on: "As soon as the incident occurred, we immediately implemented our emergency protocols and we are working closely with the relevant authorities to investigate the exact causes. Operations have been suspended and the fire services have confirmed that the mill is safe.
"Safety is our paramount concern at all of our facilities and the well-being of our colleagues is our number one priority." Last year three workers from the plant were taken to hospital with burns. Celsa directly employs 725 people at its Cardiff site and supports around 3,000 jobs.