The 18-year-old came to the United States in December under the visa waiver program, according to court documents.
"Upon arrival, he expressed a fear of returning to Singapore ... Six weeks later, Yee requested asylum at his first appearance before an immigration judge," according to a ruling issued Friday.
Judge Samuel Cole described Yee as a "young political dissident" and approved his asylum.
"His prosecution, detention and general maltreatment at the hands of Singapore authorities constitute persecution on account of Yee's political opinions," the ruling said.
The Department of Homeland Security, which opposed his asylum application, has until April 17 to appeal the judge's decision, the ruling said.
Trouble with authorities in Singapore
In July 2015, Yee was detained for 53 days after he posted a YouTube tirade praising the death of Singapore's first Prime Minister, Lee Kuan Yew. Yee described the politician as "totalitarian" and compared him unfavorably to Jesus and Mao Zedong.
In that case, a court found him guilty of eight charges: six related to "wounding religious feelings" and two for his failure to turn up at a police station when summoned.
"He has, on several occasions, deliberately elected to do harm by using offensive and insulting words and profane gestures to hurt the feelings of Christians and Muslims," principal district judge Ong Hian Sun wrote in court documents obtained by CNN at the time.
Critics have said his arrest and subsequent detention highlighted the restrictions on free speech in Singapore, where criticism of leaders and the government is frowned upon.