Results of a search for ultra-high-energy neutrinos with the Pierre Auger Observatory from the direction of the blazar TXS 0506+056 are presented. They were obtained as part of the follow-up that stemmed from the detection of high-energy neutrinos and gamma rays with IceCube, Fermi-LAT, MAGIC, and other detectors of electromagnetic radiation in several bands. The Pierre Auger Observatory is sensitive to neutrinos in the energy range from 100 PeV to 100 EeV and in the zenith-angle range from θ = 60° to θ = 95°, where the zenith angle is measured from the vertical direction. No neutrinos from the direction of TXS 0506+056 have been found. The results were analyzed in three periods: One of 6 months around the detection of IceCube-170922 A, coinciding with a flare period of TXS 0506+056, a second one of 110 days during which the IceCube collaboration found an excess of 13 neutrinos from a direction compatible with TXS 0506+056, and a third one from 2004 January 1 up to 2018 August 31, over which the Pierre Auger Observatory has been taking data. The sensitivity of the Observatory is addressed for different spectral indices by considering the fluxes that would induce a single expected event during the observation period. For indices compatible with those measured by the IceCube collaboration the expected number of neutrinos at the Observatory is well below one. Spectral indices as hard as 1.5 would have to apply in this energy range to expect a single event to have been detected.