Two-dimensional (2D) Ruddlesden–Popper hybrid perovskites (RPHPs) have shown enormous potential for photoelectric applications owing to their advantages of structural diversity and unique physical properties. Despite extensive studies, the cage-incorporation of secondary amines (e.g., dimethylamine, DMA) to explore 2D RPHPs remains a great challenge. Herein, we present a new member of 2D RPHPs, (BA)2(DMA)Pb2Br7 (1, BA+ = n-butylammonium), for which organic DMA+ cations are enclosed in perovskite cavities. The inorganic perovskite sheets and organic BA+ spacing layers are arranged in the alternate packings, resembling a 2D quantum-well motif. This feature is advantageous for the photoconductivity properties. Consequently, the crystal-based array detectors of 1 exhibit strong photodetection performances, including high detectivity (2.0 × 1011 Jones), large responsivity (31.1 mA W−1), and fast response time (∼8 μs). Moreover, its intrinsic 2D quantum-well structure endows significant anisotropy of conductivity and optical absorption, which account for the strong polarization response with a large dichroic ratio of ∼1.43, falling in the range of other 2D RPHPs. These results reveal the potential of 1 for photodetection and simultaneously shed light on the research on new candidates of 2D RPHPs.