Owing to the difficulty in obtaining mammary gland tissue from lactating animals, it is difficult to test the expression levels of genes in mammary gland. The aim of the current study was to identify if milk fat globule (MFG) in buffalo milk was an alternative to mammary gland (MG) and milk somatic cell (MSC) for gene expression analysis. Six buffalos in late lactation were selected to collect MFG and MSC, and then MG was obtained by surgery. MFG was stained with acridine orange to successfully visualise RNA and several cytoplasmic crescents in MFG. The total RNA in MFG was successfully isolated and the integrity was assessed by agarose gel electrophoresis. We analysed the cellular components in MFG, MG and MSC through testing the expression of cell-specific genes by qRT-PCR. The results showed that adipocyte-specific gene (AdipoQ) and leucocyte-specific genes (CD43, CSF1 and IL1α) in MFG were not detected, whereas epithelial cell marker genes (Keratin 8 and Keratin 18) in MFG were higher than in MSC and lower than in MG, fibroblast marker gene (vimentin) in MFG was significantly lower than in MG and MSC, milk protein genes (LALBA, BLG and CSN2) and milk fat synthesis-related genes (ACC, BTN1A1, FABP3 and FAS) in MFG were higher than in MG and MSC. In conclusion, the total RNA in MFG mainly derives from mammary epithelial cells and can be used to study the functional gene expression of mammary epithelial cells.