Phosphoenolpyruvate carboxylase (PEPC) is a ubiquitous cytosolic enzyme that catalyzes the irreversible β-carboxylation of phosphoenolpyruvate (PEP) in presence of HCO3− to produce oxaloacetate (OAA) during carbon fixation and photosynthesis. It is well accepted that PEPC genes are expressed in plants upon stress. PEPC also supports the biosynthesis of biocompatible osmolytes in many plant species under osmotic stress. There are five isoforms of PEPC found in peanut (Arachis hypogaea L.), namely, AhPEPC1, AhPEPC2, AhPEPC3, AhPEPC4, and AhPEPC5. Quantitative real-time polymerase chain reaction (qRT-PCR) analysis revealed that the gene expression patterns of these AhPEPC genes were different in mature seeds, stems, roots, flowers, and leaves. The expression of all the plant type PEPC (PTPCs) (AhPEPC1, AhPEPC2, AhPEPC3, and AhPEPC4) was relatively high in roots, while the bacterial type PEPC (BTPC) (AhPEPC5) showed a remarkable expression level in flowers. Principal component analysis (PCA) result showed that AhPEPC3 and AhPEPC4 are correlated with each other, indicating comparatively associations with roots, and AhPEPC5 have a very close relationship with flowers. In order to investigate the function of these AhPEPCs, the fragments of these five AhPEPC cDNA were cloned and expressed in Escherichia coli (E. coli). The recombinant proteins contained a conserved domain with a histidine site, which is important for enzyme catalysis. Results showed that protein fragments of AhPEPC1, AhPEPC2, and AhPEPC5 had remarkable expression levels in E. coli. These three recombinant strains were more sensitive at pH 9.0, and recombinant strains carrying AhPEPC2 and AhPEPC5 fragments exhibited more growth than the control strain with the presence of PEG6000. Our findings showed that the expression of the AhPEPC fragments may enhance the resistance of transformed E. coli to osmotic stress.