The grant is part of the federal Race to the Top initiative and the money is going to the Auburn, Federal Way, Highline, Kent, Renton, Seattle and Tukwila school districts.
The districts competed together, created the Puget Sound Educational Service District and drew up a unified plan.
King County's application was one of 16 winners out of 372 entries. Grants ranged from $5 million to $40 million, and King County was one of two to win the $40 million grant. The grant's amount was determined by the number of students, the special district said.
"The region's plan is designed to have big impact where it's needed most. We are excited to roll out strategies that will help all students experience success," said John Welch, superintendent of the Puget Sound Educational Service District.
The special district covers 261 schools and 150,000 students. It says 36,000 of those students are of high-needs.
Welch said the grant, spread over four years, will help schools fund science, technology, engineering and math programs; early learning; and college preparation in high school and middle school.
The 16 winners represent 55 school districts across 11 states, the U.S. Department said.
"When we level the playing field by providing increased access and opportunity for our students, everyone wins," said Democratic U.S. Sen. Patty Murray in a statement.