The invention discloses a mid-far infrared avalanche photodetector which comprises a substrate, a buffer layer, a lower ohmic contact layer, a multiplication layer, a charge layer, a gradient layer, an absorption layer and an upper ohmic contact layer which are sequentially connected from bottom to top, and the doping type of the substrate and the buffer layer is n type. Or the mid-far infrared avalanche photodetector comprises the substrate, the buffer layer, a second ohmic contact layer, the absorption layer, the gradient layer, the charge layer, the multiplication layer and a first ohmic contact layer which are sequentially connected from bottom to top, and the doping type of the substrate and the buffer layer is p type, wherein the multiplication layer is made of an AlAsxSb1-x material, x is greater than or equal to 0.12 and less than or equal to 0.18, the gradient layer is of a plurality of (InAs)m/(AlAs0.15Sb0.85)n quantum well structures or an InyAl1-yAszSb1-z material, and thedetection wavelength of the absorption layer is a middle and far infrared band. The mid-far infrared avalanche photodetector provided by the invention can block dark current and reduce noise, does notneed a cooling device, improves the working temperature of the device, reduces the cost, and is convenient to use.