The applications of near‐infrared spectroscopy (NIRS) are limited due to the bulky size, low integration, and poor intelligence in edge computing of traditional spectrometers. In this work, the authors develop an on‐chip InGaAs intelligent spectral sensor, which consists of a linear variable filter for wavelength selection, a linear focal plane array as detector and a chip processor for neural‐network inferring, based on an advanced 3D heterogeneous hybrid‐integration. More than 200 spectral channels with a spectral resolution of 1.25% central wavelength are acquired in a wide waveband from 900 to 1700 nm. Immediate results are provided onsite for users, especially applicable to nonspecialists, owing to the embedded algorithmic model in‐sensor. As a proof of applications, the authors experimentally detect adulterating green tea and achieve a real‐time identification with accuracy better than 90%. This spectral sensor with edge‐artificial‐intelligence breaks the dependence on external algorithms and paves the way for NIRS into miniaturization, integration, and intelligence, which brings more possibilities in incorporating with the consumer devices and the Internet of Things.