Rapidly developing and intensive animal husbandry of livestock is a major contributor to global environmental pollutions. Large quantities and high concentrations of manure waste that contains phytate phosphorus are generated. The use of phytase can effectively solve the problem of high phosphorus pollution in the fecal material of monogastric animals. Enviropigs, producing phytase in the salivary glands and secreting the enzyme in the saliva, were first generated at the University of Guelph (Guelph, ON, Canada) in 1999. However, phytase is easily inactivated in digestive processing. To address this problem, we improved the transgene construct and successfully generated phytase transgenic pigs by handmade cloning. The Escherichia coli periplasmic phosphoanhydride phosphohydrolase (appA) gene was subcloned. Using fragment substitution method, we designed a phytase gene that was insensitive to cleavage by pepsin and trypsin and had a higher affinity for the substrate. After codon optimization, the designed phytase gene was named Cafp and subcloned downstream of the pig parotid secretory protein (PSP) gene promoter. The tissue-specific vector p-PSP-Intron-Cafp was constructed and transferred into Landrace fetal fibroblasts by electroporation. The cell lines carrying Cafp were used as nuclear donors in handmade cloning. Cloned embryos were cultured in vitro to blastocysts and transferred to recipient sows. The presence of Cafp was tested by PCR and sequencing of cloned pigs. Phytase activity in saliva, feed, and feces was detected by the ammonium molybdate method with a slight modification. Immunohistochemistry (IHC) was used to determine tissue-specific expression. Three cell lines carrying Cafp were obtained. We generated 1027 blastocysts; 712 were of good quality and transferred to 6 recipients. Fourteen piglets were born, of which 6 survived. The PCR and sequencing results showed that 7 (3 live and 4 dead) of the 14 piglets carried Cafp. Phytase activity in the saliva of the 6 live cloned pigs was tested at 4 months of age and only 1 pig had 0.155 FTU mL–1 enzyme activity. The enzyme in the other 2 pigs may be inactivated in the transgenic parotid gland. Among all the transgenic pigs, the highest phosphorus digestion rate was 59.2% of intake, which represents a 25.4% decrease in fecal emissions compared with the average of controls. The IHC results on the 3 later dead, Cafp-positive pigs showed that the transgene was expressed only in parotids, confirming tissue-specific gene expression. In summary, cleavage-resistant phytase transgenic pigs were successfully produced through handmade cloning. The cloned pigs offer a unique biological approach to manage phosphorus nutrition and environmental pollution in animal husbandry.