Based on canonical correlation analysis (CCA), we propose a technique to map the peak electron density of the ionospheric F2-layer (NmF2) from the global observations of the total electron content (TEC). We first statistically analyze the canonical correlation between NmF2 and TEC using the NmF2 observations of the worldwide ionosonde stations and global ionospheric maps (GIMs) of TEC (TEC-GIMs) provided by the Jet Propulsion Laboratory. The obtained CCA modes consist of the CCA patterns and corresponding amplitudes, which separately reflect the short-term (e.g., diurnal variation) and long-term (e.g., annual, semiannual variations, and solar-cycle variations, etc.) tendencies of NmF2. With the obtained CCA patterns and corresponding amplitudes, we then construct two TEC-derived models of the monthly median NmF2, a single station model at Boulder (105.3°W, 40°N) and a global model. The CCA results are further compared with the observations and corresponding NmF2 predictions of the International Reference Ionosphere 2007 (IRI-07). It is found that the CCA NmF2 is in better agreement with the observations at Boulder than the IRI-07 NmF2. On the other hand, the temporal and spatial structures of NmF2 are successfully reproduced by the global model. Furthermore, the correlation coefficient (root mean square error) of the CCA NmF2 versus the observed NmF2 is relatively higher (lower) than that of IRI-07 NmF2. The CCA NmF2 from the global model is more reliable. Thus, we conclude that the CCA technique provides an effective approach to map the global NmF2 from the TEC-GIMs.