The metallicity dependence of the wide-binary fraction in stellar populations plays a critical role in resolving the open question of wide binary formation. In this paper, we investigate the metallicity ([Fe/H]) and age dependence of the wide-binary fraction (binary separations between $10^3$ and $10^4$ AU) for field F and G dwarfs within 500 pc by combining their metallicity and radial velocity measurements from LAMOST DR5 with the astrometric information from Gaia DR2. We show that the wide-binary fraction strongly depends on the metallicity: as metallicity increases, the wide-binary fraction first increases, peaks at [Fe/H]$simeq 0$, and then decreases at the high metallicity end. The wide-binary fraction at [Fe/H]$=0$ is about two times larger than that at [Fe/H]$=-1$ and [Fe/H]$=+0.5$. This metallicity dependence is dominated by the thin-disk stars. Using stellar kinematics as a proxy of stellar age, we show that younger stars have a higher wide-binary fraction at fixed metallicity close to solar. We propose that multiple formation channels are responsible for the metallicity and age dependence. In particular, the positive metallicity correlation at [Fe/H]$<0$ and the age dependence may be due to the denser formation environments and higher-mass clusters at earlier times. The negative metallicity correlation at [Fe/H]$>0$ can be inherited from the similar metallicity dependence of close binaries, and radial migration may play a role in enhancing the wide-binary fraction around the solar metallicity.