Bring a large pot of water to boil over high heat. Add green beans and cook until bright green, about 4-6 minutes depending on how crisp you want them. While green beans are cooking, prepare an ice bath by filling a large bowl with some ice and water.
Transfer the cooked green beans quickly with a slotted spoon or tongs to the prepared ice bath. Set aside and let the green beans cool.
Preheat oven to 400°F. In a large ovenproof skillet over medium heat (I love using my large cast-iron for this), add butter. When melted, add onions and cook until tender and translucent, about 5 minutes, stirring occasionally.
Add mushrooms and season with salt and pepper. Cook for 5 more minutes, stirring occasionally, until mushrooms have become tender and reduced in size.
Add garlic and nutmeg and cook until fragrant, about 30 seconds.
Add flour and cook for 1 minute, stirring frequently, until the flour is well combined with the mushrooms and onions.
Add broth and stir to combine, making sure to scrape up any brown bits that are stuck to the bottom of the skillet. Cook for 2 minutes, stirring occasionally.
Reduce heat to low and add half and half. Stir together to combine, bring to a simmer, and simmer 10 minutes until the sauce has thickened. The sauce should generously coat the back of a spoon without sliding off.
Remove from heat. Drain the green beans from the water, and add them to the skillet. Toss together with sauce until fully coated.
Top with fried onions, and bake for 15 minutes. Serve immediately.
Notes
Make-ahead instructions: Assemble the casserole all the way through tossing the green beans with the gravy sauce. Then cover with aluminum foil and refrigerate up to 24 hours. Right before baking, top the casserole with fried onions and bake per instructions.
To make this in a casserole dish instead of an oven-safe skillet, make the green beans and sauce as directed. Then transfer both to a 9x9-inch baking dish (or a dish similar in size dish), top with fried onions, and bake as directed.
Want to make this for a large gathering? You can easily double this recipe! Just double all of the ingredients and use 2 cups of fried onions. Make the green beans and sauce as directed, then transfer both to a 9x13-inch baking dish. Top with fried onions and bake as directed, or until sauce is bub
Don't like mushrooms? You can completely leave them out if you prefer, or you could add in an extra 1/2 onion instead.