Machine technology frequently putsmagnetic or electrostatic repulsive forces to practical use, as inmaglev trains, vehicle suspensions or non-contact bearings1,2. Incontrast, materials designoverwhelmingly focuses on attractive interactions, such as in the many advanced polymer-based composites, where inorganic fillers interact with a polymer matrix toimprovemechanical properties. However, articular cartilage strikingly illustrates how electrostatic repulsion can be harnessed to achieve unparalleled functional efficiency: it permits virtually frictionless mechanical motion within joints, even under high compression3,4. Here we describe a composite hydrogel with anisotropic mechanical properties dominated by electrostatic repulsion between negatively charged unilamellar titanatenanosheets5 embedded within it.Crucial to the behaviour of this hydrogel is the serendipitous discovery of cofacial nanosheet alignment in aqueous colloidal dispersions subjected to a strong magnetic field, which maximizes electrostatic repulsion6 andthereby induces a quasi-crystalline structural ordering7,8 overmacroscopic length scales and with uniformly large face-to-face nanosheet separation.We fix this transiently induced structural order by transforming the dispersion into a hydrogel9,10 using light-triggered in situ vinyl polymerization11. The resultant hydrogel, containing charged inorganic structures that align cofacially in amagnetic flux12-19, deforms easily under shear forces applied parallel to the embedded nanosheets yet resists compressive forces applied orthogonally. We anticipate that the concept of embedding anisotropic repulsive electrostatics within a composite material, inspired by articular cartilage, will open up new possibilities for developing soft materials with unusual functions.