The settlement was announced Wednesday by the AIDS Law Project of Pennsylvania and the Milton Hershey School, which is financed by a trust that holds the controlling interest in The Hershey Co. candy manufacturer. The settlement is subject to court approval.
The school, for poor and socially disadvantaged students, also must pay $15,000 in civil penalties and provide HIV training for students and staff members.
The Philadelphia-based AIDS Law Project sued the school in federal court last year after it refused to enrol the boy, an honour roll student from the Philadelphia area, on the grounds that he would be a threat to other students' health and safety.
The school initially defended its decision, saying it was difficult but appropriate under the circumstances.
"In order to protect our children in this unique environment," the school said in December after the lawsuit was filed, "we cannot accommodate the needs of students with chronic communicable diseases that pose a direct threat to the health and safety of others."
The boy's attorney countered that he required no special accommodations and controlled his HIV with medication that wouldn't affect his school schedule.
"This young man is a motivated, intelligent kid who poses no health risk to other students but is being denied an educational opportunity because of ignorance and fear about HIV and AIDS," attorney Ronda Goldfein said then.
In August, the school reversed its policy and announced it would treat applicants with HIV the same as others.
The school, which has about 1,850 students in pre-kindergarten through 12th grade, also offered to admit the boy, identified in the lawsuit by the pseudonym Abraham Smith, but he and his mother decided he would seek other educational opportunities instead.
The school was founded in 1909 by chocolate maker Milton Hershey, whose company's products include Hershey's Kisses and Kit Kat. It's financed by the Milton Hershey School Trust and educates poor and socially disadvantaged students for free.
The Los Angeles-based AIDS Healthcare Foundation, which says it provides medical care to people with HIV and AIDS all over the world and contributed money to the boy's cause, welcomed news of the settlement.
"No doubt, advocacy aided this young man's quest for justice," foundation president Michael Weinstein said in a statement.
Around Easter, the foundation staged protests in San Francisco, New York City and Hershey, calling for a boycott of Hershey's candy and asking the public to send the company a message: "No Kisses for Hershey."