Maize (Zea mays L.) is one of Pakistan’s essential staple food crops. Plant-parasitic nematodes (PPNs) are a significant restraint in maize production. However, free-living nematodes (FLNs) provide crucial ecological functions such as suppressing pests and nutrient mineralization. This study aimed to assess the community analysis of plant-parasitic and free-living nematodes associated with maize and other rotational crops (those cultivated in sequence with the maize in the same field) from Punjab, Pakistan. The occurrence percentage was observed per 500 g soil for each nematode genus. The present study revealed that 24 species of plant-parasitic and free-living nematodes were identified from maize crops and other rotational crops from 16 localities through Punjab, Pakistan. Nematode communities were analyzed by absolute frequency, relative frequency, relative density, and prominence value, while cluster analysis was based on the presence or absence of nematode in different localities. The overall proportion of plant-parasitic nematodes was 35%, while free-living soil nematodes recovered 65%, out of 210 samples of maize and other rotational crops. Several major genera of plant-parasitic nematodes were reported during the present study viz., Ditylenchus, Filenchus, Helicotylenchus, Hemicriconemoides, Heterodera, Hoplolaimus, Malenchus, Pratylenchus, Psilenchus, Rotylenchulus, Seinura, Telotylenchus, Tylenchorhynchus, and Xiphinema Community relationship revealed the overall dominance of Heterodera zeae, with the highest incidence (55.71%) followed by Tylenchorhynchus elegans (33.33%) and Helicotylenchus certus (24.76%). The results provide valuable information on the community structure of nematodes in maize and other rotational crops of maize in Punjab, Pakistan. Moreover, this data can be used as a preventive measure before PPN incidence results in greater losses on maize.