The ability to assemble functional materials with precise spatial arrangements is important for applications ranging from protein crystallography to photovoltaics. Here, we describe a general framework for constructing two-dimensional crystals with prescribed depths and sophisticated three-dimensional features. The crystals are self-assembled from single-stranded DNA components called DNA bricks. We demonstrate the experimental construction of DNA brick crystals that can grow to micrometre size in their lateral dimensions with precisely controlled depths up to 80 nm. They can be designed to pack DNA helices at angles parallel or perpendicular to the plane of the crystal and to display user-specified sophisticated three-dimensional nanoscale features, such as continuous or discontinuous cavities and channels. The programmed assembly of single DNA strands into bricks and ultimately micrometre-sized two-dimensional crystals with prescribed depths up to 80 nm is described. These crystals display intricate three-dimensional features including continuous or discontinuous cavities and channels with nanometre precision, and can pack DNA helices in parallel or perpendicularly to the plane of the crystals.