The onions are the part that can turn a good green bean casserole into a soggy one. I learned to treat them like a topping, not part of the filling: the beans and mushroom sauce bake first, and the golden onions go on for just the last few minutes. That timing gives Green Bean Casserole from Scratch its creamy middle and a crisp top that still has some crunch when you serve it.
The sauce starts with mushrooms cooked until their moisture is gone, then flour helps it turn into a smooth, spoon-coating gravy. Fresh green beans keep their bite after a quick boil and a stint in the oven, so the casserole doesn’t collapse into a soft, watery bake. I like how each part keeps its own texture: tender beans, savory mushroom sauce, and crisp-fried onion.
Frying the onions takes a little attention, but the rest comes together in one skillet and one baking dish. The result is rich without relying on canned soup, with enough browned mushroom flavor to make every forkful taste like it belongs together.

Kitchen Note
Drain the green beans thoroughly before they meet the sauce. Water clinging to them can thin the creamy mixture, and a few extra moments in the colander are worth it.
Save this from-scratch green bean casserole for its creamy mushroom sauce and crisp onion topping, added right at the end.
Why the Crispy Onions Wait Until the Casserole Is Baked
The onions and the filling need different things from the oven. The green beans need time in the mushroom sauce to heat through, and the sauce needs to bubble around the edges. The fried onions, on the other hand, are already cooked. They need only a short spell of heat on top, not a long bake buried under moisture.
Putting the onions on at the beginning gives steam from the filling time to soften their light cornstarch coating. Waiting until the casserole has baked keeps that coating from sitting against the creamy sauce for the full bake. The final five minutes warm the topping without asking it to cook again from raw. You’ll still get a little softening as the casserole rests, but the top keeps far more crunch than it would if it baked the whole time.
That order also makes serving easier: the casserole can finish bubbling before the onions go on, so you can focus on the topping at the end instead of watching it brown while the center catches up.
What Gives the Beans, Sauce, and Onion Topping Their Texture

- Fresh green beans — They stay firmer than canned beans through the oven bake. Choose beans that feel crisp and snap cleanly; trim the ends and cut them into even pieces so they cook at the same pace.
- Cremini mushrooms — Their earthy flavor gives the sauce a savory base. Clean off any visible dirt and slice them evenly; white button mushrooms work in the same amount if that’s what you have, though the flavor will be milder.
- Cornstarch — It gives the onion coating a light, crisp finish rather than a thick breaded shell. Keep the slices thin, and shake off loose starch before frying so the oil doesn’t collect excess coating.
- All-purpose flour — Flour thickens the mushroom sauce after it’s stirred into the butter and mushrooms. For a gluten-free version, use a gluten-free all-purpose flour blend in its place; the sauce may have a slightly different finish, but it still thickens.
- Whole milk and heavy cream — Together they make the sauce creamy and full-bodied. Whole milk keeps it from feeling as heavy as cream alone, while the cream adds richness; reduced-fat milk won’t give quite the same texture.
- Low-sodium chicken broth — It loosens the flour-thickened base and adds savory depth without making the sauce overly salty. Vegetable broth is the practical swap when you want a vegetarian casserole.
Frying the Onions, Cooking the Beans, and Building the Sauce
Soak and fry the onion slices
Put the thinly sliced onion in a bowl, pour the buttermilk over it, and let it soak for 10 minutes. Heat the canola oil in a heavy 3-quart saucepan to 350°F while the onion soaks. Drain the slices, toss them with cornstarch, and shake off the excess before frying in batches for 2 to 3 minutes, turning occasionally, until golden. Let the oil return to 350°F between batches, then transfer the onions to a paper towel-lined plate and sprinkle with 1/2 teaspoon salt.
Blanch the beans until crisp-tender
Bring the water and 1 teaspoon salt to a boil in a large pot, then add the trimmed green beans. Cook them for 4 to 5 minutes, until they’re bright green and crisp-tender; they’ll soften a little more in the oven. Drain them well before adding them to the sauce. If they’re limp now, they’ll be softer still after baking.
Cook the mushrooms into a savory base
Melt the remaining 4 tablespoons butter in a 12-inch skillet over medium heat. Add the sliced mushrooms and cook for 8 to 10 minutes, stirring occasionally, until browned and their liquid has evaporated. Stir in the garlic for 30 seconds, then sprinkle in the flour and keep stirring for 1 minute. If the mushrooms still look wet, give them more time before adding the flour; that moisture needs to cook off for the sauce to thicken properly.
Whisk the sauce and bake the casserole
Gradually whisk in the chicken broth, whole milk, and heavy cream, then simmer for 3 to 5 minutes, whisking often, until the sauce coats the back of a spoon. Stir in the remaining 1/2 teaspoon salt and the black pepper, then fold in the drained beans. Transfer everything to a 9×13-inch baking dish greased with 1 teaspoon butter and bake at 375°F for 20 to 25 minutes, until bubbling around the edges. Scatter the fried onions over the top, bake for 5 minutes more until hot, and let the casserole rest for 10 minutes before serving.
Easy Swaps for a Different Green Bean Casserole
Make it vegetarian with vegetable broth
Replace the chicken broth with vegetable broth. The casserole keeps its creamy mushroom character, with a slightly less meaty, savory base.
Make it gluten-free with a flour blend
Swap the all-purpose flour for a gluten-free all-purpose flour blend. Keep the cornstarch for the onion coating; the sauce may be a little less silky depending on the blend, but it still makes a creamy casserole.
Use white button mushrooms
Swap in the same amount of sliced white button mushrooms for cremini. They’re easy to find and work well in the sauce, though the finished casserole will taste a little less earthy.
Storage and Reheating
- Refrigerator: Store leftovers covered for 3 to 4 days. The onions will soften as they sit against the sauce.
- Freezer: Freeze cooled portions in airtight containers for up to 2 months; the sauce and beans may be softer after thawing. Thaw in the refrigerator before reheating.
- Reheating: Warm covered in a 350°F oven until hot throughout, then uncover for the last few minutes if you’d like to revive some crunch. Avoid reheating uncovered the entire time, which can dry out the beans and sauce.
Questions That Come Up With Homemade Green Bean Casserole

Green Bean Casserole from Scratch
Ingredients
Equipment
Method
- Heat the oven to 375°F.
- Grease a 9x13-inch baking dish with 1 teaspoon of the butter.
- Put the sliced onion in a bowl, pour the buttermilk over it, and let it soak for 10 minutes.
- Heat the canola oil in a heavy 3-quart saucepan to 350°F.
- Drain the onion, toss it with the cornstarch, and shake off the excess.
- Fry the onion in batches for 2 to 3 minutes per batch, turning occasionally, until golden; let the oil return to 350°F between batches.
- Transfer the onions to a paper towel-lined plate and sprinkle with 1/2 teaspoon of the salt.
- Bring the water and 1 teaspoon of the salt to a boil in a large pot.
- Add the green beans and cook for 4 to 5 minutes, until bright green and crisp-tender, then drain well.
- Melt the remaining 4 tablespoons butter in a 12-inch skillet over medium heat.
- Add the mushrooms and cook for 8 to 10 minutes, stirring occasionally, until browned and their liquid has evaporated.
- Stir in the garlic and cook for 30 seconds.
- Sprinkle in the flour and stir for 1 minute.
- Gradually whisk in the chicken broth, milk, and heavy cream.
- Simmer for 3 to 5 minutes, whisking often, until thick enough to coat the back of a spoon, then stir in the remaining 1/2 teaspoon salt and the black pepper.
- Stir the drained green beans into the mushroom sauce and transfer the mixture to the prepared baking dish.
- Bake for 20 to 25 minutes, until bubbling around the edges.
- Scatter the crispy onions over the casserole and bake for 5 minutes, until the topping is hot.
- Rest for 10 minutes before serving.