Casorate Primo borders the following municipalities: Besate, Bubbiano, Calvignasco, Morimondo, Motta Visconti, Trovo, Vernate.
The first evidence of settlement in the current location of the town date back to the 2nd and 3rd centuries AD, during the ancient Roman dominion of the area (at which time the land was part of Cisalpine Gaul, due to being inhabited by Celtic peoples, such as the Insubres).
Another appears in 977 AD, in which Holy Roman Emperor Otto II gave the Bishop of Pavia feudal sovereignty over a territory which included Casorate.
Due to being under such a rule, the town was shielded from a lot of political affairs, even though its territory saw the 1239 battle between the Lombard League and Frederick II of Hohenstaufen, which saw the latter's defeat.
Casorate Primo was referred to as an oppidum in the 15th century, which would suggest that it had city walls, similar to some nearby communes such as Binasco and Rosate.