Recent methods in DNA nanotechnology are enabling the creation of intricate nanostructures through the use of programmable, bottom-up self-assembly. However, structures consisting only of DNA are limited in their ability to act on other biomolecules. Proteins, on the other hand, perform a variety of functions on biological materials, but directed control of the self-assembly process remains a challenge. While DNA–protein hybrids have the potential to provide the best-of-both-worlds, they can be difficult to create as many of the conventional techniques for linking proteins to DNA render proteins dysfunctional. We present here a sortase-based protocol for covalently coupling proteins to DNA with minimal disturbance to protein function. To accomplish this we have developed a two-step process. First, a small synthetic peptide is bioorthogonally and covalently coupled to a DNA oligo using click chemistry. Next, the DNA–peptide chimera is covalently linked to a protein of interest under protein-compatible conditions using the enzyme sortase. Our protocol allows for the simple coupling and purification of a functional DNA–protein hybrid. We use this technique to form oligos bearing cadherin-23 and protocadherin-15 protein fragments. Upon incorporation into a linear M13 scaffold, these protein–DNA hybrids serve as the gate to a binary nanoswitch. The outlined protocol is reliable and modular, facilitating the construction of libraries of oligos and proteins that can be combined to form functional DNA–protein nanostructures. These structures will enable a new class of functional nanostructures, which could be used for therapeutic and industrial processes.