Abstract Background Salmonella is recognized as a common bacterial cause of foodborne diarrheal illness worldwide, and animal or its food products have been the most common vehicles of the Salmonella infections. This study aimed to investigate the distribution of Salmonella in two commercial layer farms and to determine the genetic relatedness between these strains. The Salmonella isolates were serotyped by slide agglutination using commercial antisera and analyzed for genetic relatedness using pulsed-field gel electrophoresis (PFGE). Results The internal environment had the highest prevalence of Salmonella (14/15, 93.3%), followed by external environment (60/96, 62.5%) and egg samples (23/84, 27.3%). The prevalence of Salmonella in the environment was significantly higher than that in egg samples (p < 0.05). The occurrence of Salmonella in the internal environment (93.3%) was relatively higher than in the external environment (55.6–77.2%). The 111 isolates were distributed among 15 PFGE types, and the PFGE results suggested that there existed cross-contamination between these strains not only from eggs, but also from the environments. Conclusions The findings indicated ongoing Salmonella cross-contamination inside or outside of the layer farms, and that Salmonella could also spread along the egg production line.