Dinners

Mac and Cheese Ham Casserole Baked

Updated · By Stir & Share

Total timeprep + cook
1 hr 10 min
Prep
20 min
hands-on
Cook
50 min
oven or stovetop
Serves
6
as written
USDA safe temp
160°F / 71°C
check the thickest part

Jump to recipe Save

Mac and Cheese Ham Casserole Baked

Time: 1 hr 10 min  ·  Serves: 6  ·  The key step: Cook the pasta 2 minutes shy of al dente so it stays firm after baking. This is a creamy, cheesy baked casserole with chunks of ham and a golden breadcrumb topping—a hearty weeknight dinner that also works for potlucks or using up leftover ham.

Ingredients

  • 12 oz (340 g) elbow macaroni (or similar short pasta)
  • 4 tbsp (56 g) unsalted butter, divided
  • 1/4 cup (30 g) all-purpose flour
  • 3 cups (720 ml) whole milk, warmed
  • 1 tsp dry mustard powder
  • 1/2 tsp garlic powder
  • 1/2 tsp onion powder
  • 1/2 tsp salt, plus more for pasta water
  • 1/4 tsp black pepper
  • 3 cups (340 g) sharp cheddar cheese, shredded
  • 1 cup (100 g) Gruyère or Swiss cheese, shredded (optional)
  • 2 cups (280 g) cooked ham, diced
  • 1 cup (50 g) panko breadcrumbs
  • 2 tbsp (28 g) butter, melted (for topping)

Instructions

  1. Preheat oven to 375°F (190°C). Butter a 9×13-inch (23×33 cm) baking dish.
  2. Bring a large pot of salted water to a boil. Cook the macaroni for 2 minutes less than the package directs (about 6–7 minutes). Drain and set aside.
  3. In a large saucepan over medium heat, melt 4 tbsp butter. Whisk in the flour and cook for 1 minute, stirring constantly.
  4. Gradually whisk in the warm milk. Cook, stirring, until the sauce thickens and bubbles, about 5–7 minutes.
  5. Remove from heat. Stir in mustard powder, garlic powder, onion powder, salt, and pepper.
  6. Add the shredded cheeses a handful at a time, stirring until melted and smooth. The sauce will be thick.
  7. Stir in the diced ham and the cooked macaroni. Transfer to the prepared baking dish.
  8. In a small bowl, mix the panko with the melted butter. Sprinkle evenly over the casserole.
  9. Bake uncovered for 25–30 minutes, until bubbly and golden on top. The internal temperature of the casserole should reach 160°F (71°C) (USDA FSIS safe minimum for egg dishes; if you added eggs, use this). Let rest for 5 minutes before serving.

Cheese, Ham, and Pasta Swaps

Use any good melting cheese: Monterey Jack, Colby, or American. Smoked cheddar adds a smoky note. If you skip the Gruyère, increase cheddar to 4 cups total. For ham, use leftover baked ham, deli ham, or even smoked turkey—just dice it into 1/2-inch (1 cm) pieces. Gluten-free pasta works; cook it 1 minute less than the package says and check that the sauce is not too thin—add 2 tbsp extra flour if needed.

Baking and Topping Tips

Undercook the pasta by 2 minutes. It will finish cooking in the oven, and the casserole will hold its shape rather than turning mushy. Warm the milk before adding it to the roux; cold milk can cause lumps. If the sauce seems too thick before baking, stir in 1/4 cup (60 ml) extra milk. For a crispier topping, broil the casserole for 2–3 minutes at the end, watching closely so it doesn’t burn.

What Can Go Wrong

Grainy sauce: If the cheese is added over high heat or the sauce boils too hard, the cheese can separate. Keep the heat low when melting the cheese. Soggy casserole: Overcooked pasta or a thin sauce will make the casserole watery. Cook pasta 2 minutes short and let the sauce bubble until it coats a spoon. Dry casserole: Too much baking time or too little sauce dries it out. Bake just until bubbly, about 25 minutes, and cover with foil if the top browns too fast.

Storing and Reheating

Refrigerate leftovers within 2 hours in an airtight container for up to 4 days. To reheat, add a splash of milk and warm in the oven at 350°F (175°C) for 15–20 minutes, or microwave in 30-second bursts. Freeze the baked casserole for up to 3 months; thaw overnight in the fridge and reheat until 165°F (74°C) throughout. The topping will soften after freezing.

What to Serve With It

Serve with a crisp green salad dressed with vinaigrette to cut the richness. Steamed broccoli or green beans are classic sides. For a full meal, add a simple tomato salad or roasted carrots. This casserole is hearty enough to stand alone, but it also pairs well with crusty bread for mopping up the sauce.

Related

Safe minimum internal temperatures follow USDA FSIS; raw-fish guidance follows the U.S. FDA. See our food safety notes.

Spotted an error? Tell us and we will correct it (corrections policy).