Preheat oven to 350°F (175°C). Lightly grease a 9x13-inch baking dish.
In a large skillet over medium heat, cook ground beef and chopped onion until beef is browned and onions are soft. Drain excess fat.
In a mixing bowl, combine cream of mushroom soup, milk, sour cream, salt, and pepper.
Layer half of the potatoes in the baking dish. Top with half of the beef mixture and half of the soup mixture. Repeat layers.
Sprinkle cheddar cheese evenly over the top.
Cover with aluminum foil and bake for 45 minutes. Uncover and bake for an additional 15 minutes or until bubbly and golden brown on top.
Let stand for 5 minutes before serving.