Many people travel with dual citizenship and dual passports. It is not illegal and rather typical in the EU, Canada, Australia, and especially Hong Kong, and becoming more frequent in China - especially since China somewhat relaxed its one-child policy for the Han-race minority (other recognized and designated minorities in China are not restricted by the one-child policy).
These are the simple steps to traveling with dual nationality passports. This assumes your child has both a Chinese AND a UK passport already, as I'm not familiar with entering / exiting China without a passport, even for babies.
Upon entry/exit China, use China travel documents.
Upon entry/exit UK, use your UK travel documents.
Rarely do immigration officials check WHERE you came from if you use that country's passport. If you're asked, just present the other passport, which shows entry/exit stamps. As you're traveling with a child on your UK passport and your child's Chinese passport, you should expect them to scrutinize both the entry and exit carefully, because of the issues of child trafficking and child kidnapping. If the immigration officer asks where you came from and the passport has no record of that exit - you'll need to show the second passport for proof.
If asked why you're entering the country with that country's passport - just tell them it's the law for dual citizenship holders.
There is nothing illegal about traveling with dual nationality passports, unless one of your home countries specifically has laws against that. It MAY raise eyebrows in third world countries (too many spy movies), but in most developed countries - this is not unusual; not pervasive, but not unusual.
As long as you're forthcoming in your answers - you should have no issues traveling with your child.
FYI - in the USA - even if/when our child is/was a baby, we were required to secure children's passports when traveling.
Children's passports expire every FIVE (5) years and the USA recently stopped its program of "adding pages" to passports, so we always get the "extra pages" passports, at no additional cost (adding pages used to cost us USD 80+, while a new passport was USD 105).
Finally - and not related to this thread - if your child was born in a foreign country and you secured a US Consulate/Embassy Report of Birth Abroad as a "birth certificate" AND you bring your kids to China under the US passport - the US State Department will NOT authenticate your children's birth certificates.
If you have this issue, PM me and I'll tell you how to legally resolve this issue, bypassing the US State Department's bizarre policy (since 2012). If more than one person PM's me - I'll just start another thread.