Is it illegal to replace someone else's trademark with your own trademark to sell the same goods?

This is illegal and infringes on the exclusive right of others to use registered trademarks. Any of the following acts is an infringement of the exclusive right to use a registered trademark:

(1) Using a trademark identical with or similar to its registered trademark on the same or similar goods without the permission of the trademark registrant;

(2) selling goods that infringe upon the exclusive right to use a registered trademark.

Extended data:

Famous trademarks in the international market are often registered in many countries. There are "registered trademarks" and "unregistered trademarks" in China. Registered trademarks are trademarks protected by law after being registered by relevant government departments, while unregistered trademarks are not protected by trademark law.

A sign used to distinguish one operator's brand or service from other operators' goods or services. China's Trademark Law stipulates that trademarks approved and registered by the Trademark Office, including commodity trademarks, service trademarks, collective trademarks and certification trademarks, enjoy the exclusive right to use trademarks and are protected by law. If it is a well-known trademark, it will be protected by cross-category laws.