Neutron energy spectra at 90 deg produced from stopping-length graphite, aluminum, iron, and lead targets and at 180 deg produced from a thin lithium target bombarded with 140-MeV protons were measured in the irradiation room of the neutron time-of-flight (TOF) course at the Research Center of Nuclear Physics of Osaka University. The neutron energy spectra were obtained by using the TOF technique in the energy range from 10 MeV to the incident proton energy of 140 MeV. The experimental data for a thick target at 90 deg were compared with calculations performed with the Particle and Heavy Ion Transport code System (PHITS) using the evaluated nuclear data. It was shown that PHITS using the evaluated nuclear data is able to reproduce the secondary neutron spectra at 90 deg. The experimental data for a thin target at 180 deg were compared with calculations using the nuclear physics models in PHITS and the Monte Carlo N-Particle eXtended code (MCNPX). We found that the two codes work well at 180 deg in the neutron energy region above 10 MeV.