Potassium (K) deficiency is a common abiotic stress that can inhibit the growth of fruit and thus reduce crop yields. Little research has been conducted on pear transcriptional changes under low and high K conditions. Here, we performed an experiment with 7-year-old pot-grown “Huangguan” pear trees treated with low, Control or high K levels (0, 0.4, or 0.8 g·K2O/kg soil, respectively) during fruit enlargement and mature stages. We identified 36,444 transcripts from leaves and fruit using transcriptome sequencing technology. From 105 days after full blooming (DAB) to 129 DAB, the number of differentially expressed genes (DEGs) in leaves and fruit in response to low K increased, while in response to high K, the number of DEGs in leaves and fruit decreased. We selected 17 of these DEGs for qRT-PCR analysis to confirm the RNA sequencing results. Based on GO enrichment and KEGG pathway analysis, we found that low-K treatment significantly reduced K nutrient and carbohydrate metabolism of the leaves and fruit compared with the Control treatment. During the fruit development stages, AKT1 (gene39320) played an important role on K+ transport of the leaves and fruit response to K stress. At maturity, sucrose and acid metabolic pathways were inhibited by low K. The up-regulation of the expression of three SDH and two S6PDH genes involved in sorbitol metabolism was induced by low K, promoting the fructose accumulation. Simultaneously, higher expression was found for genes encoding amylase under low K, promoting the decomposition of the starch and leading the glucose accumulation. High K could enhance leaf photosynthesis, and improve the distribution of the nutrient and carbohydrate from leaf to fruit. Sugar components of the leaves and fruit under low K were regulated by the expression of genes encoding 8 types of hormone signals and reactive oxygen species (ROS). Our data revealed the gene expression patterns of leaves and fruit in response to different K levels during the middle and late stages of fruit development as well as the molecular mechanism of improvement of fruit sugar levels by K and provided a scientific basis for improving fruit quality with supplemental K fertilizers.