Autonomous microrobots can reach hard-to-access regions in the human body for minimally invasive therapy. However, their microscale size limits the integration of on-board memory, making their operation dependent on external controls. Here, we develop a magnetic probiotic microrobot integrated with memory-capable genetic circuit to execute autonomous antitumor treatment. Through a one-time magnetic hyperthermia trigger, the biological thermal sensor in the microrobot perceives temperature change and activates the memory module Bxb1-ssrA-attB-P7-attP, transferring the microrobots into a therapeutic state to continuously degrade fibrin and soften the tumor microenvironment. The genetic memory remains active for at least 12 days. A synergy toward deep tumor penetration is subsequently established between the memory-encoded softening and the physical penetration through magnetically controlled wave-like locomotion of microrobots. Compared with memory-absent microrobots, the proposed microrobots achieve a 6.70-fold tumor matrix stiffness reduction and boost in vivo anticancer efficacy from 21.86 to 87.52%. Beyond oncology, the proposed system establishes a generalizable framework of memory-encoded medical microrobots.