Direction of arrival (DOA) estimation has long been an attractive research topic in various industries and is a vital technique for intelligent wireless systems. Conventional DOA estimation methods based on array antennas suffer from high latency in signal postprocessing, leading to complex hardware architecture, high cost, and low efficiency. Recently, some metasurface‐based methods have emerged as alternatives, but they have limited applications due to the stringent requirements for equipment and environment. Here, an efficient method is proposed to lift these limitations by combining artificial neural networks (ANNs) with space‐time‐coding (STC) digital metasurfaces. The ANN‐enabled DOA estimation achieves high accuracy by simply analyzing the spatial‐spectral characteristics of the STC modulation, which utilizes only harmonic amplitudes without phases, and thus features a much‐simplified hardware architecture. The proposed method does not require large computational resources and is more robust in practical applications. For validation, several ANN models trained with simulated and measured data are presented in a microwave regime. Moreover, a potential application of this method is demonstrated in secure communications. The proposed theory and metasurface provide on‐demand selections of ANN models for reaching optimal DOA estimations in different scenarios, which holds promising applications in wireless sensing, communication, radar, and other self‐adaptive information systems.