The small, rural district, home to Lincoln University and a growing Hispanic population, erupted into controversy when some of Madden's e-mails were first made public in March. Despite growing calls from special-education parents and superintendent Raymond A. Fischer that Madden lose his job, the principal's allies on the school board initially suspended him for four months instead.
The school's director of special education, Jenny LeSage, quit last spring rather than work for Madden, who has headed Oxford Area High School since 2005.
Madden's support collapsed in recent days as the head of the Chester County Intermediate Unit recommended his departure in the face of lawsuits and complaints to the state Department of Education.
Kirk Williard, an assistant director at the IU, will run the school until a new principal is hired.
Madden has not been at work for two weeks as IU executive director Joseph O'Brien negotiated a settlement.
Madden's downfall began during a meeting in December with the family of a bipolar child and a special-education advocate who noticed Madden texting another administrator. In the text, Madden used an an obscenity in referring to the teen and labeled him a "manipulator."
The advocate reported it to her supervisor at the Arc of Chester County, which provides services to the disabled. It requested all Madden's communications in reference to the student. That request uncovered other derogatory messages about the teen and other special-education students.
Madden was given his job back on July 1. By then other parents of disabled children had asked for their children's records, which revealed more off-color Madden e-mails, including jokes about parents and students and intimate notes to his girlfriend.
In one e-mail Madden wrote of the superintendent: "Ray is an absolute liar and manipulator and I am not going to take it from him. He better pray I don't snap one day/night."
Connie Mohn, the Arc's director of advocacy, said the group was thrilled that Madden was leaving and hoped the district "really commits to creating an environment in which all students are welcomed and embraced."
She reserved her harshest criticism for the school board, which she said "needed to be disbanded."
"This decision isn't being made based on what's right for kids with disabilities. It's not because they decided he [Madden] was wrong. It's being made because they were strong-armed. That is incredibly disheartening," said Mohn.
Madden, a former Marine who was hired from neighboring Octorara School District, was popular with many students and teachers.
A "Save Dave" Facebook page had more than 400 supporters, and many people wore "Save Dave" buttons to school board meetings.
Paul Matthews, whose son is in 10th grade, said Madden couldn't do enough to help his younger son, Eli, who died of leukemia in 2011 at age 10.
"Whatever he could do to help, he was there," he said.
Matthews, who said Madden gave an inspiring back-to-school speech last year, was inclined to give the principal a pass.
"Everyone makes mistakes in life," he added. "We all get frustrated and say things and do things we don't mean to say. I don't think it's worth ruining this man's career who has so much love for that school and kids."
Another parent, Bill Winand, said he was glad the fighting was over.
"This controversy has put neighbor against neighbor," said Winand, who has two children in the district, neither in special education.
He said he was baffled that the dispute had gone on as long as it did. Not only will it hurt taxpayers, he said, it damaged the district's reputation.
"If I would have said something like that to one of my clients," said the sales manager, referring to Madden's e-mails, "my boss would have fired me in a second."
Contact Kathy Boccella at 610-313-8123, firstname.lastname@example.org, or @kmboccella on Twitter.