Preheat the oven to 350°F (175°C).
Bring a large pot of lightly salted water to a boil. Add rotini pasta and cook for 8–10 minutes, until tender but still firm to the bite. Drain well.
While the pasta cooks, heat a large skillet over medium heat. Add ground beef and diced onion, cooking until the beef is browned and the onion is tender. Drain any excess fat.
Stir spaghetti sauce and sliced pepperoni into the cooked beef mixture. Heat until everything is combined and warmed through.
Add the cooked rotini pasta to the sauce mixture and stir until the pasta is evenly coated.
Transfer the pasta mixture to a baking dish and spread evenly.
Sprinkle mozzarella cheese over the top.
Bake in the preheated oven until the cheese is melted and bubbly.
Serve warm and enjoy.