late 12c., mycrocossmos (modern form from early 15c.), "human nature, man viewed as the epitome of creation," literally "miniature world," from Medieval Latin microcosmus, from Greek mikros "small" (see micro-) + kosmos "world" (see cosmos).
General sense of "a community constituting a world unto itself, a little society" is attested from 1560s, perhaps from Middle French microcosme. A native expression in the same sense was petty world (c. 1600).
Forrþi mahht tu nemmnenn mann Affterr Grikkishe spæche Mycrocossmos, þat nemmnedd iss Affterr Ennglisshe spæche Þe little werelld. ["Ormulum," c. 1175]