We use the sensitive X-ray data from the Chandra Orion Ultradeep Project (COUP) to study the X-ray properties of 34 spectroscopically-identified brown dwarfs with near-infrared spectral types between M6 and M9 in the core of the Orion Nebula Cluster. Nine of the 34 objects are clearly detected as X-ray sources. The apparently low detection rate is in many cases related to the substantial extinction of these brown dwarfs; considering only the BDs with $A_V leq 5$ mag, nearly half of the objects (7 out of 16) are detected in X-rays. Our 10-day long X-ray lightcurves of these objects exhibit strong variability, including numerous flares. While one of the objects was only detected during a short flare, a statistical analysis of the lightcurves provides evidence for continuous (`quiescent) emission in addition to flares for all other objects. Of these, the $sim$ M9 brown dwarf COUP 1255 = HC 212 is one of the coolest known objects with a clear detection of quiescent X-ray emission. The X-ray properties (spectra, fractional X-ray luminosities, flare rates) of these young brown dwarfs are similar to those of the low-mass stars in the ONC, and thus there is no evidence for changes in the magnetic activity around the stellar/substellar boundary, which lies at $sim$ M6 for ONC sources. Since the X-ray properties of the young brown dwarfs are also similar to those of M6--M9 field stars, the key to the magnetic activity in very cool objects seems to be the effective temperature, which determines the degree of ionization in the atmosphere.