The madrasa is an important milestone for the LGBTQ community in the overwhelmingly fundamental Muslim country, where transgender people face ostracism, even though there is no official restriction on them attending religious schools or praying at mosques.
"Most families do not accept transgender people. They throw them out of their homes. Transgender people turn to wrongdoing," Khan, 34, said, as other transgender people, their heads similarly covered, swayed back and forth behind her, reciting Koran verses.
"At one time, I was also one of them."
Holding back tears, Khan recalled how she was disowned by her family at 13 and forced into begging.
At 17, she joined a transgender group, dancing at weddings and other functions, but quit it to connect with her religion after a dream in which a deceased transgender friend and fellow dancer pleaded with her to do something for the community.
Khan studied the Koran at home, and attended religious schools, before opening the two-room madrasa in October.
"I'm teaching the Koran to please God, to make my life here and in the hereafter," Khan said, explaining how the madrasa offered a place for transgender people to worship, learn about Islam and repent for past actions.
She says the school has not received aid from the government, although some officials promised to help students find jobs.
Along with some donations, Khan is teaching her students how to sew and embroider, in hopes of raising funds for the school by selling clothing.
Pakistan's parliament recognized the third gender in 2018, giving such individuals fundamental rights such as the ability to vote and choose their gender on official documents.
Nonetheless, the transgender remain on the margins in the country, and often have to resort to begging, dancing and prostitution to make a living.
The madrasa could help trans people assimilate into mainstream society, Islamabad Deputy Commissioner Hamza Shafqaat told Reuters.
"I'm hopeful that if you replicate this model in other cities, things will improve," he said.
A religious school for transgender people has opened in Dhaka, the capital of nearby Bangladesh, and last year a Christian transgender group started its own church in Pakistan's bustling southern port city of Karachi.
Pakistan's 2017 census recorded about 10,000 transgender people, though trans rights groups say the number could now be well over 300,000 in the country of 220 million.
"It gives my heart peace when I read the Koran," said one madrasa student, Simran Khan, who is also eager to learn life skills."It is much better than a life full of insults," the 19-year-old added.