We show how the coherent oscillations of a nanomechanical resonator can be entangled with a microwave cavity in the form of a superconducting coplanar resonator. Dissipation is included and realistic values for experimental parameters are estimated.