The investigation of violation of environmental laws by Tesla was initiated by the San Francisco district attorney's office in 2018.
It soon turned into a combined civil environmental case by 25 district attorneys from across California.
The prosecution alleged that Tesla violated the laws by improperly disposing used lead acid batteries, antifreeze, paint and electronic waste at its car service and energy centers throughout the US state.
"While electric vehicles may benefit the environment, the manufacturing and servicing of these vehicles still generates many harmful waste streams," San Francisco District Attorney Brooke Jenkins said in a statement.
There was no immediate response from Tesla.
What did the court say?
Besides the monetary fine, the court order has also ordered Tesla to outsource auditors to conduct annual audits of some of its trash containers for hazardous waste for the next five years.
It has also asked the company to provide mandatory training to employees on properly disposing of hazardous materials.
Of the total settlement money, $1.3 million will be distributed among the 25 counties while $200,000 will be used to compensate the cost of investigations, according to the court order.