Again you can take the VIA rail from Montreal Gare Central station to Quebec City station.
Just a suggestion: It's way cheaper and more convenient to take the bus between Montreal and Quebec City. Busses leave every hour on the hour, and your bus ticket is open--so you get on whenever you like. Plus it's about $75 roundtrip (unless you're a student, which gives you a discount) and the bus station in Quebec City is in the same building as the train station. With VIA, you have maybe 2 trains per day for about twice the price.
It's only about 3 1/2 hours between each city. Not too long to spend on the bus!