The eclipsing M dwarf binary system, YY Gem, was observed using Chandra covering 140 ks (2Prot) in total, split into two even exposures separated by 0.76 d (0.94 Prot). The system was extremely active: three energetic flares were observed over the course of these observations. The flaring and non-flaring states of the system are analysed in this paper. The activity level increased between the first and second observations even during the quiescent (non-flaring) phases. An analysis of the dynamics of the X-ray-emitting plasma suggests that both components are significantly active. Contemporaneous Hα spectra also suggest that both components show similar levels of activity.The primary star is the likely source of at least two of the flares. From a detailed analysis of the flare emission at the maximum temperature and maximum density with single loop flare models, we find loop lengths of ∼0.7R*, 1.5R* and 1.8R*. All of these flares are strongly associated with hot (>10 MK) X-ray emission which appears to predominantly trace the orbital motion of the primary star. The two largest flaring loops are similar to the largest sizes reported in other active M stars and span nearly half the interbinary system; this may indicate magnetospheric interaction between the binary star coronae. We discuss the time and spectral resolution requirements that are necessary to recover detailed information about coronal structure from the X-ray spectra in similar cool star systems.