Preheat oven to 425 degrees. In a large pot of boiling salted water, cook green beans until tender, 4 to 6 minutes. Drain, and set aside.
In a large saucepan, melt butter over medium. Transfer 2 tablespoons to a medium bowl, and set aside for breadcrumb topping. To remaining butter in pan, add flour and garlic; cook, whisking, for 1 minute (do not let brown). Gradually whisk in milk; bring to a boil. Reduce to a simmer; cook until sauce has thickened, 2 to 3 minutes. Stir in green beans and artichoke hearts; season with salt, pepper, and a pinch of cayenne. Transfer to a shallow 2-quart baking dish.
Toss breadcrumbs with reserved melted butter; scatter over green bean mixture. Bake until crumbs are golden brown and sauce is bubbling, 10 to 15 minutes.