A judge said he decided to grant the restraining order based on the health and safety of the students.
Students are supposed to be taking standardized tests and advanced-placement exams on Friday.
The district has already gone to the California Public Employment Relations Board. The board said the union is engaging in an unfair labor practice. However, that wasn't enough to stop the walkout.
The district has a $600 million deficit.
LAUSD Superintendent Ramon Cortines said the teachers union could instead negotiate a furlough day, and save the district $12 million.
Cortines said employees have the right to voice their opinion, but a walkout would be irresponsible, and it wouldn't fix the budget crisis.
The school board will consider a plan to offer early retirement to custodians, librarians, cafeteria workers and other nonteaching staff.
If more employees opt for early retirement, the district says it will be able to spare more jobs.
Layoff notices will be sent next month instead of on Friday if the board backs the proposal.