The tragedy occurred at the Banksia Road Public School when the car collided with a wooden classroom building not long after lessons started.
"The vehicle continued inside the building and tragically we have had a number of young children injured as a result," said New South Wales Assistant Commissioner Stewart Smith.
"As a result of that collision, five kids were urgently conveyed to Westmead Hospital. Tragically, two of those kids, male children, are deceased."
The children who died were aged eight. A further 18 children were treated at the scene for minor injuries.
More From This Section
"We're not looking at this as an intentional act. It is a crash investigation," added Smith.
NSW Ambulance Superintendent Stephanie Radnidge said medics arrived to "a scene of carnage".
"There were a number of distressed and overwhelmed children and teachers at the scene of a horrible accident," she said.
"There was obviously pandemonium.