Coxiella burnetii is the worldwide zoonotic infectious agent for Q fever in humans and animals. Farm animals are the main reservoirs of C. burnetii infection, which is mainly transmitted via tick bites. In humans, oral, percutaneous, and respiratory routes are the primary sources of infection transmission. The clinical signs vary from flu-like symptoms to endocarditis for humans’ acute and chronic Q fever. While it is usually asymptomatic in livestock, abortion, stillbirth, infertility, mastitis, and endometritis are its clinical consequences. Infected farm animals shed C. burnetii in birth products, milk, feces, vaginal mucus, and urine. Milk is an important source of infection among foods of animal origin. This study aimed to determine the prevalence and molecular characterization of C. burnetii in milk samples of dairy animals from two districts in Punjab, Pakistan, as it has not been reported there so far. Using a convenience sampling approach, the current study included 304 individual milk samples from different herds of cattle, buffalo, goats, and sheep present on 39 farms in 11 villages in the districts of Kasur and Lahore. PCR targeting the IS1111 gene sequence was used for its detection. Coxiella burnetii DNA was present in 19 of the 304 (6.3%) samples. The distribution was 7.2% and 5.2% in districts Kasur and Lahore, respectively. The results showed the distribution in ruminants as 3.4% in buffalo, 5.6% in cattle, 6.7% in goats, and 10.6% in sheep. From the univariable analysis, the clinical signs of infection i.e. mastitis and abortion were analyzed for the prevalence of Coxiella burnetii. The obtained sequences were identical to the previously reported sequence of a local strain in district Lahore, Sahiwal and Attock. These findings demonstrated that the prevalence of C. burnetii in raw milk samples deserves more attention from the health care system and veterinary organizations in Kasur and Lahore of Punjab, Pakistan. Future studies should include different districts and human populations, especially professionals working with animals, to estimate the prevalence of C. burnetii.