It is not illegal to print the national flag on T-shirts, but if it is a large-scale commercial production, it must be clearly avoided whether it is suspected of trademark and advertising issues, and it is not illegal; at the same time, if the T-shirts are used by others to do illegal things matters, you need to be careful to bear the relevant legal responsibilities.
According to Article 18 of the "Flag Law of the People's Republic of China": "The national flag and its patterns shall not be used as trademarks and advertisements, and shall not be used for private funeral activities."
Article 19 stipulates: “Anyone who intentionally insults the flag of the People’s Republic of China and the People’s Republic of China by burning, damaging, scribbling, defiling, or trampling on it in a public place shall be investigated for criminal responsibility in accordance with the law; if the circumstances are relatively minor, The person shall be detained for not more than 15 days by the public security organ.”
Extended information
Notes on designs with national flags
Products may have designs with national flags. The flags of other countries are used as patterns. Foreign flag patterns cannot be used as trademarks unless the country agrees.
Relevant regulations: Article 18 of the "Flag Law" stipulates that the national flag and its patterns shall not be used as trademarks and advertisements, and shall not be used for private funeral activities.
The "Trademark Law" stipulates: Article 10 The following signs shall not be used as trademarks: the same country name, national flag, national emblem, national anthem, military flag, military emblem, military anthem, medals, etc. Identical or similar, and the same as the name or logo of a central state agency, the name of a specific location where it is located, or the name or graphics of a landmark building;
The same as the name, national flag, national emblem, or military flag of a foreign country etc. are identical or similar, except with the consent of the government of the country;
Baidu Encyclopedia: The People's Republic of China and the Flag Law of the People's Republic of China