Preheat the oven to 375 degrees and lightly grease a 9-by-9-inch baking dish.
Bring a large pot of salted water to a boil and cook the elbow macaroni until just al dente. Drain and set aside.
In a medium saucepan, melt the butter over medium heat. Whisk in the flour and cook for one minute until smooth.
Slowly pour in the milk while whisking. Continue cooking and whisking until the sauce thickens enough to coat the back of a spoon.
Remove the sauce from the heat and stir in the salt, pepper, and shredded cheddar until fully melted.
Add the drained macaroni and diced smoked ham to the cheese sauce and stir until everything is evenly coated.
Transfer the mixture to the prepared baking dish and sprinkle the breadcrumbs evenly over the top.
Bake for 20 to 25 minutes until the edges bubble and the breadcrumbs turn light golden. Let the dish rest for five minutes before serving.