Spanish channel Telecinco's "Aida" programme last weekend featured a scene in which a bar owner adds "and no Chinese either" to a sign barring dogs from his establishment.
The channel's owner said in a statement that the bar owner character, named Mauricio Colmenero, was a caricature of a "racist, chauvinist and fascist man who embodies everything we do not want in our society".
But the joke appeared to be lost on Chinese foreign ministry spokesman Hong Lei, who called the programme an insult to his nation.
"The Spanish TV station repeatedly broadcast TV programmes that insult Chinese and played to the gallery by slandering Chinese," he told a regular press briefing in Beijing.
"We demand that the TV station face up to its mistakes, take seriously the calls for justice from the public, and correct its mistakes," he added.
A sign supposedly reading "No Dogs and Chinese allowed" became part of Communist propaganda after it was said to have hung outside a park in Shanghai when Western powers controlled parts of China.
It has become part of Chinese folklore and featured in the 1972 Bruce Lee film "Fists of Fury" — but many historical experts say no such sign ever existed.
This is the second time in recent months, Chinese authorities have complained about an allegedly racist Spanish TV show.
In January, China's embassy in Spain demanded an apology from Telecinco after they aired a 'vulgar' and 'insulting' comedy sketch during their New Year Gala.