Once upon a time there were 280 million little pigs. They lived in a land called China, which styled itself a "People Republic" even though its curly-tailed citizens appeared to be more important than their custodians.

While the people did their best to cut down the production of more people and keep those already born from eating too much, pigs were encouraged to have as many offspring as possible and ate a great deal.

Today, in the 29th year of the government founded by the late Chairman Mao Tse-tung, his slogan "one man, one pig" has gained a new luster. After years in which dark political clouds hung over the nation's barnyards, victory has been won over an influential Communist Party faction that was the Chinese have just revealed, unquestionably antipig.

Other crimes of this "Gang of Four" affecting people have been revealed in the 16 months since the group which included Mao's widow Chiang Ching, was removed from power. Now, however, the official People's Daily has reported that the gang also attacked as "capitalism" the honorable Chinese family habit of raising a pig or two in the backyard.

Such talk was clearly garbage that no self-respecting Chinese hog or human would ever swallow. "It is an honor to breed pigs for the revolutions!" said the newspaper, decrying a brief plunge in pig production caused by the gang. "It is a virtue to have fat pigs for sale to the state."

China has 40 percent of all the world's pigs. Their population has increased in the last 29 years twice as fast as that of China's people. Everything pigs produce, from the bristles on the backs to what they leave lying on the ground, has taken on great significance in the foreign trade, grain production and general wellbeing of the nation.

Pigs were first domesticated in China more than 7,000 years ago. There are four times as many of them in China as any other nation, including the United States with its 55 million pigs and the Soviet Union with 72 million. They provide China's principal meat products, as well as huge quantities of fertilizer, brushes, leather, soap and some other exotic food items.

Now, one of the leading members of the Chinese Politburo, Vice Premier Chen Yung-kuei, has announced a new program for creating more farmland that will depend in great measure on pig productivity.

Chen, who raised pigs during his days as leader of the model production brigade at Tachai, wants to enrich barren wasteland with great doses of manure. A commune farming clay-like soil in Heilungkiang has been declared a model in this effort. The New China News Agency reported that it had "a number of special teams set up to take charge of manure accumulation [and] pig raising had been stepped up."

But, the People's Daily revealed recently, vestiges of the Gang of Four's attitude towards pigs has inhibited progress.

Wang Wan-huin, a peasant in Kwangsi Province, seemed to understand pigs. They prospered under the sparetime care he and his family provided.

Just last year he supplied more than 20,000 pounds of pig manure to the collective and sold three of his six pigs to the state, at a profit for him of perhaps $25 a pig.

When the local party organization decided to publish an article about Wang's achievements, some people objected. "A commune member raising pigs to earn more money . . . is leaning toward capitalism and should not be advocated," they said.

A similar dispute arose on a Hupel commune when the local production brigade began to distribute ground wheat husks to ail the families who were raising pigs. Those without pigs objected."This increases selfishness among the pig raising families and helps capitalism grow," they said. Party leaders quickly explained that pig raising "not only raises the living standard of the people but supplies more manure for the collective, more pork for the state and stimulates trade between city and village," the newspaper concluded.

Local groups were urged to retain veterinarians to make sure the pigs are comfortable.

In Kwangtung Province, at the White Cloud Mountain State Farm, a mechanized pig farm, has been opened, promising to produce as many as 10,000 fat hogs at a time. But the emphasis remains on family care.

In his novel "Animal Farm," George Orwell had his upwardly mobile, Stalinist pigs learn to walk on their hind legs. Orwell is banned in China, but somehow the phrase has crept into the official vocabulary, this time meaning private families and public communes must both pitch in for the pigs. Said the People Daily's: "We must 'walk on two legs' in a big way."

During the past week of Chinese New Year celebrations, what Peking now calls "spring festival," there has been a lot more eating than raising of pigs. But spring will bring more piglets, and the Chinese appear determined to give the individualistic beasts the kind of personalized family oriented attention that will allow them to live happily ever after, or at least until they are nice and fat.