The invention relates to the technical field of preparation of foaming agents used for oil recovery in an oil reservoir, and in particular relates to a preparation method for a temperature-resistant salt-tolerant oil-displacing foaming agent. According to the method provided by the invention, firstly a reaction is performed to obtain a linear alkyl benzene sulfonate, the linear alkyl benzene sulfonate is compounded with alkyl diphenyl ether sodium disulfonate and polyacrylamide to obtain a novel substance, so that thermal stability is enhanced, and the temperature resistance and salt toleranceof the oil-displacing foaming agent are improved; a hydrogen bond is easily formed in polyacrylamide, so that the mineralization resistance and salt tolerance of the substance are improved; a titanate coupling agent is used to modify quartz sand powder, and the modified quartz sand powder, yeast powder and white sugar are subjected to fermentation together, so that the temperature resistance of the alkyl benzene sulfonate is enhanced at the high temperature, and the temperature resistance of the oil-displacing foaming agent is improved; and a polyether, a sodium carbonate solution and a sulfonated castor oil foam stabilizer are added, so that the salt tolerance of the foaming agent can be enhanced, the stability of foam is improved, the temperature resistance and salt tolerance of the oil-displacing foaming agent are further improved, and the oil-displacing foaming agent has broad application prospects.