Deformation monitoring is a crucial approach to ensuring safety and reliability of thin-walled structures. In this study, an electrical-resistance-based deformation monitoring method was utilized for real-time structural health monitoring of 3D printed continuous carbon fiber reinforced thin-walled composite structures. The correlation between deformation and electrical resistance changes was investigated in quasi-static lateral and axial compression for the composite structures with three different layer heights. Results showed that the mechanical–electrical behaviors during lateral and axial compression processes manifested distinct forms. A bilinear relationship between relative resistance change and compression displacement during lateral compression was obtained. Furthermore, the composite structures with lower layer heights demonstrated a higher linear correlation coefficient. Under axial compression, the relative resistance change showed a fluctuating fall/rise pattern. This pattern was associated with intricate damage morphology observed in the composite structures, such as fiber-to-fiber contact, fiber breakage, and fiber pull-out. In addition, the relative resistance change demonstrated a falling-rising pattern in the composite structures with a layer height of 0.3 mm, while it exhibited a falling-rising-falling pattern with other layer heights. The established correlation between the relative resistance change and deformation could facilitate real-time self-monitoring of deformation and failure states in thin-walled structures.