A magnetic substance detection sensor includes a support substrate, a semiconductor chip provided on the support substrate and having a magnetic field detection element, a permanent magnet provided on the support substrate, and a resin encapsulation layer covering the semiconductor chip and the permanent magnet. The resin encapsulation layer has a first resin layer exposing the permanent magnet and covering the semiconductor chip, and a second resin layer continuously covering the permanent magnet and the first resin layer, and stress caused by curing contraction of the second resin layer is smaller than that of the first resin layer.