In an ever expanding railway network all around the world, the need for track maintenance grows steadily. Traditionally, one major part of track maintenance is ramming large vibrating steel picks into the gravel between and under railway sleepers to compress the gravel and generate a safe substructure. Even today, maintenance personnel still have to manually locate the sleepers if they cannot be detected by computer vision systems or visually by the operator. Here we developed a first of its kind magnetic sleeper detector, even able to find sleepers, buried in gravel, undetectable by vision based systems. Our approach of magnetic detection is based on a DC magnetic field excitation and a detector moving with respect to the rail system, including the sleepers and fasteners for mounting the rails. Due to railway application constraints a large air gap between the sensor and the sleeper structure is required, which significantly complicates the magnetic sensing task for robust sleeper detection. The design and optimization of the magnetic circuit was based on extensive 3D simulation studies to ensure highest possible variation in magnetic flux density at the sensor locations for absence and presence of a sleeper. Furthermore, a low noise and high sensitivity electronic circuit has been realized to cope with sensor signal offsets from unknown or changing sensor orientations with respect to the earth’s magnetic field, or magnetic interferences from other trains potentially passing by during active measurements. Since we only want to detect sleepers in close vicinity of the moving sensor system, digital signal processing of the acquired signals can easily compensate for disturbing slowly changing or static field components within real world application scenarios. We demonstrate that magnetic detection of even buried sleepers on railway tracks is possible for distances of up to 172 mm between the sensor and the sleeper. This enables an even higher level of railway maintenance automation previously impossible in certain scenarios.