Near-infrared (NIR) light refers to a kind of electromagnetic wave whose wavelength is between visible light and mid-infrared. Two regions are separately distinguished in the NIR region, including the NIR first region (700–1000 nm) and the NIR second region (1000–1700 nm). Compared with visible light, NIR light has the advantages of being invisible to human eyes, strong penetrating ability of biological tissue, and avoiding autofluorescence interference. NIR luminescent materials are widely used in disease marker detection, temperature sensing, in vivo imaging, fluorescence anti-counterfeiting, gas detection and other fields. At present, NIR luminescent materials based on rare earth/transition metals ions doped materials have received more and more attention due to their high luminous efficiency, continuously adjustable wavelength, and good photothermal stability. In rare earth ions doped phosphors, the materials doped with Pr3+, Nd3+, Sm3+, Dy3+, Ho3+, Er3+, Tm3+, Yb3+, and Eu2+ have emissions in the NIR region, among which Nd3+, Er3+, and Yb3+ are the most studied NIR luminescent ions. The emission peak position of trivalent rare earth ions is generally consistent in different substrate materials, therefore the ability to adjust the emission peak position is relatively small. The main purpose of regulating trivalent rare earth ion doped NIR luminescent materials is to enhance their emission intensity. Currently, researchers have mainly developed four strategies to enhance the emission efficiency of trivalent rare earth ion doped NIR luminescent materials: (1) Selecting matrix materials with high emission efficiency; (2) encapsulating nanoparticles with a shell layer; (3) enhancing the NIR emission of trivalent rare earth ions through sensitization enhancement; and (4) achieving NIR emission enhancement by utilizing cross relaxation. In transition metal ions doped phosphors, the materials doped with Cr3+, Cr4+, Ni2+, Mn2+, Mn4+, Mn5+, Mn6+, and Fe3+ have emission peaks in the NIR region. Among them, Cr3+-doped phosphors are the most studied materials. In this review, we focus on the electronic structure of Cr3+, and elaborate on the luminescent properties of Cr3+ in different host materials, including their emission peak range, full width at half maximum, quantum yield, photothermal stability, etc. In addition, the optical properties of other transition metal ions doped phosphors such as Cr4+, Ni2+, Mn2+, Mn4+, Mn5+, Mn6+, and Fe3+ ion-doped NIR luminescent materials are also briefly introduced. Then the application of rare earth/transition metal ions doped NIR luminescent materials in the detection of disease markers, in vivo imaging, NIR LED, temperature sensing, etc., are discussed. In disease marker detection, these materials can be used to detect specific biomarkers in biological fluid or tissue, providing a non-invasive and sensitive way to diagnose diseases. In in vivo imaging, these materials can emit light at specific wavelengths that can penetrate deep into tissue and organs, providing high-resolution images for medical professionals to analyze. In LED applications, rare earth/transition metal ion doped NIR luminescent materials can be used to prepare special light sources with very broad emission peaks and low energy consumption. In temperature sensing, by detecting the emission intensity or lifetime characteristics of these rare earth/transition metal ions doped NIR luminescent materials at different temperatures, it is possible to determine the temperature of local deep-tissue in living organisms. In the end, various problems existing in rare earth/transition metal ions doped NIR luminescent materials are also discussed. We believe that this review will help researchers in related fields to quickly understand the latest research progress, challenges, and the trend of future development of rare earth/transition metal ions doped NIR luminescent materials.