We present a code for solving the coupled Einstein-hydrodynamics equations to evolve relativistic, self-gravitating fluids. The Einstein field equations are solved in generalized harmonic coordinates on one grid using pseudospectral methods, while the fluids are evolved on another grid using shock-capturing finite difference or finite volume techniques. We show that the code accurately evolves equilibrium stars and accretion flows. Then we simulate an equal-mass nonspinning black hole-neutron star binary, evolving through the final four orbits of inspiral, through the merger, to the final stationary black hole. The gravitational waveform can be reliably extracted from the simulation.