Castor (Ricinius communis L.) is one of the oldest medicinal plants in the world. The assessment of genetic diversity in castor beans plays a vital role in identifying superior genotypes to use in plant breeding programs. For this reason, the diversity and genetic association of 22 castor ecotypes were investigated. Out of 26 screened primers, 19 primers that produced the most polymorphic bands were used. Totally, these primers generated 188 bands, of which 180 bands (95.58 %) were polymorphic. The studied ecotypes were divided into two separate group’s using cluster analysis. The highest similarity was observed between ecotypes 4 and 5 (collected from Sari) and the lowest similarity was observed between ecotypes 1 and 14 (Sari and Babolsar).The highest Nei's genetic diversity (H) and Shannon index (I) were observed in population No. 2 including 12 ecotypes. According to the genetic structure of populations performed by Structure software, ecotypes were divided into two subpopulation clusters. The molecular analysis of variance showed that 37% of genetic variation attributed to between group's and 63% to within group's, which can be used in its breeding programs.