In most eukaryotic cells, actin filaments assemble into a shell-like actin cortex under the plasma membrane, controlling cellular morphology, mechanics, and signaling. The actin cortex is highly polymorphic, adopting diverse forms such as the ring-like structures found in podosomes, axonal rings, and immune synapses. The biophysical principles that underlie the formation of actin cortices and their structural plasticity remain unknown. Using a molecular simulation platform, called MEDYAN, we discovered that varying the filament treadmilling rate induces a finite size phase transition in actomyosin network structure. We found that actomyosin networks condense into clusters at low treadmilling rates but form ring-like or cortex-like structures at high treadmilling rates. This mechanism is supported by our corroborating experiments on live T cells, which show that disrupting filament treadmilling induces centripetal collapse of pre-existing actin rings and the formation of clusters. Our analyses suggest that the actin cortex is a preferred state of low mechanical energy, which is, importantly, only reachable at high treadmilling rates.