According to a letter sent to Ms. Bloomberg’s lawyers from the general counsel for the Education Department, Ms. Bloomberg and two unnamed teachers at the school are accused of belonging to the Progressive Labor Party, a Communist organization. They are also accused of recruiting students and inviting them to participate in the party’s activities, including marches.

Ms. Bloomberg, 53, denies those allegations.

A diminutive woman whose students often tower over her, Ms. Bloomberg did not set out to become an activist against her employer. She started her career teaching in Chicago before coming to work in New York City’s schools. When she was named principal of Park Slope Collegiate in 2004 — at the time, it was one of three small high schools in the former John Jay High School building in Park Slope — she said she found a deeply neglected school with a leaky roof, toilets that overflowed, moldy walls and doors that would not open properly. The student body was being neglected as well, she said, with few of its graduates ready for the rigors of college.

But, she said, she did not think much about integration or equal resources at the time and focused on teaching.

“I taught Brown v. Board, I taught about this landmark case on integration in segregated schools, with no irony,” she said as she sat in her sparsely decorated office earlier this week. “We all just took for granted that there was something broken about the system and we have to do the best we can.”

But that changed in 2010, when she learned the education department wanted to open a new high school in her building to serve white middle- and upper-class families in the neighborhood who had shunned Park Slope Collegiate. City officials proposed creating a selective secondary school to be called Millennium Brooklyn High School as a sister school to the overwhelmingly white Millennium High School in Manhattan.

Ms. Bloomberg said she did not understand why the white parents in the neighborhood could not simply send their children to one of the existing high schools. She said she thought the district had an excellent opportunity to integrate this black and Latino high school with white students from Park Slope and neighborhoods nearby.