Similar legislation is due to be implemented in Hong Kong and Macau after a number of incidents in which soccer fans in the former British colony booed the anthem before international fixtures.
The move has caused intense controversy in Hong Kong as many people expressed concerns that they might accidentally violate the law, which, besides banning any form of distortion or insult, says people must stand and act respectfully on certain occasions when the anthem is played.
Yang, who has over a million followers on Weibo, issued two apologies in the face of mounting criticism of her performance, begging forgiveness for her "stupid mistake".
"I sincerely apologise for singing the national anthem in an unserious manner while broadcasting. What I did has hurt your feelings. I'm sorry. Sorry to the motherland, to the fans, to web users, and to the platform," she wrote, promising to cease broadcasting and undertake patriotic education and activities.
Huya, which was listed on the New York Stock Exchange in May, immediately blocked Yang after the incident and took all her videos offline.
"The national anthem is solemn and sacred ? Huya respects the anthem and firmly protects its dignity," the company said in a statement, adding that Yang's behaviour reflected her lack of awareness of the "law and social responsibility".
Meanwhile, all her videos have been deleted on TikTok, another popular streaming app through which she first rose to fame, gaining 44 million followers.
Just a few months ago, she was blocked by Kuaishou, TikTok's rival app, for asking fans for 30,000 yuan (US$4300) to add her on WeChat, China's most popular social media platform.
The popularity of live streaming in China has soared in recent years, creating a great number of web celebrities, many of them young women who share snippets of their day-to-day lives on camera.
Now the world's biggest market for live streaming, the industry in China is expected to generate US$4.4 billion in revenue this year, according to a report by Deloitte.
-South China Morning Post