Layered black phosphorus (BP) has attracted wide attention for mid-infrared photonics and high-speed electronics, due to its moderate band gap and high carrier mobility. However, its intrinsic band gap of around 0.33 electronvolt limits the operational wavelength range of BP photonic devices based on direct interband transitions to around 3.7 μm. In this work, we demonstrate that black arsenic phosphorus alloy (b-As xP1- x) formed by introducing arsenic into BP can significantly extend the operational wavelength range of photonic devices. The as-fabricated b-As0.83P0.17 photodetector sandwiched within hexagonal boron nitride (hBN) shows peak extrinsic responsivity of 190, 16, and 1.2 mA/W at 3.4, 5.0, and 7.7 μm at room temperature, respectively. Moreover, the intrinsic photoconductive effect dominates the photocurrent generation mechanism due to the preservation of pristine properties of b-As0.83P0.17 by complete hBN encapsulation, and these b-As0.83P0.17 photodetectors exhibit negligible transport hysteresis. The broad and large photoresponsivity within mid-infrared resulting from the intrinsic photoconduction, together with the excellent long-term air stability, makes b-As0.83P0.17 alloy a promising alternative material for mid-infrared applications, such as free-space communication, infrared imaging, and biomedical sensing.