Utilization of inevitable defect states in 2D materials can enable efficient photodetection and memory applications. Here, the authors report use of defect-induced deep traps to capture and store carriers in exfoliated flakes of MoS2xSe2(1-x) as photodetectors with high responsivity of 2.4 × 105 A/W at 1550 nm and non-volatile memories with photo-switching ratio of 108.