Cell‐free metabolic engineering is an emerging and promising alternative platform for the production of fuels and chemicals. In recent years, macromolecular crowding effect, which is an important function in living cells but ignored in cell‐free systems, has been transferred to cell‐free protein synthesis (CFPS). However, inhibitory effects of crowding agents on CFPS were frequently observed, and the mechanism is unclear. In this study, free Mg2+ was found to be a key factor that can regulate the macromolecular crowding effect on in vitro transcription, in vitro translation, and coupled transcript/translation. Addition of crowding agents (20% of Ficoll‐70 or Ficoll‐400) enhanced in vitro transcription at an index of free Mg2+ concentration (IFMC) below 2 mM but inhibited the transcription when the IFMC was higher than 2 mM. Similarly, Ficoll‐400 enhanced in vitro translation and coupled transcription/translation at a lower IFMC (0.1–2 mM) and inhibited the reactions at higher IFMC (>2 mM). Based on the results, CFPS systems could be further optimized by adjusting the content of crowding agents and the IFMC. Besides, the results also indicate that macromolecular crowding effect is important for maintaining the efficiency of in vivo transcription and translation which occur at a low intracellular IFMC (<1 mM).