The morphology of hexagonal phase NaYF4:Er3+ nanorods synthesized by hydrothermal method changed greatly after a continuing calcination, along with a phase transformation to cubic phase. Photoluminescence (PL) spectra indicated that mid-infrared (MIR) emission was obtained in both hexagonal and cubic phase NaYF4:Er3+ nanocrystals for the first time. And the MIR emission of NaYF4:Er3+ nanocrystals enhanced remarkably at higher calcination temperature. To prevent uncontrollable morphology from phase transformation, the cubic phase NaYF4:Er3+ nanospheres with an average size of ~100 nm were prepared via a co-precipitation method directly. In contrast, the results showed better morphology and size of cubic phase NaYF4:Er3+ nanocrystals have realized when calcined at different temperatures. And PL spectra demonstrated a more intense MIR emission in the cubic phase NaYF4:Er3+ nanocrystals with an increasing temperature. Besides, the MIR emission peak of Er3+ ions had an obvious splitting in cubic phase NaYF4. Therefore, cubic phase NaYF4:Er3+ nanospheres with more excellent MIR luminescent properties seems to provide a new material for nanocrystal-glass composites, which is expected to open a broad new field for the realization of MIR lasers gain medium.