We genetically controlled compartmentalization in eukaryotic cells by heterologous expression of bacterial encapsulin shell and cargo proteins to engineer enclosed enzymatic reactions and size-constrained metal biomineralization. The shell protein (EncA) from Myxococcus xanthus auto-assembles into nanocompartments inside mammalian cells to which sets of native (EncB,C,D) and engineered cargo proteins self-target enabling localized bimolecular fluorescence and enzyme complementation. Encapsulation of the enzyme tyrosinase leads to the confinement of toxic melanin production for robust detection via multispectral optoacoustic tomography (MSOT). Co-expression of ferritin-like native cargo (EncB,C) results in efficient iron sequestration producing substantial contrast by magnetic resonance imaging (MRI) and allowing for magnetic cell sorting. The monodisperse, spherical, and iron-loading nanoshells are also excellent genetically encoded reporters for electron microscopy (EM). In general, eukaryotically expressed encapsulins enable cellular engineering of spatially confined multicomponent processes with versatile applications in multiscale molecular imaging, as well as intriguing implications for metabolic engineering and cellular therapy.