Bring a large pot of lightly salted water to a boil. Cook pasta in boiling water for 10-12 minutes until al dente. Drain pasta and set aside.
Heat olive oil over medium heat, cook the onion, basil, and garlic until brown. Remove from pan and place into a small bowl.
Cook ground beef on medium-high heat until evenly brown. Stir in the onion mixture and the tomato sauce. Reduce heat to low and simmer for 15 minutes.
Mix ricotta, 1/2 of the mozzarella, 1/2 of the Parmesan, and the egg until creamy. Mix in pasta, coating evenly.
Grease a 9x13x3 inch baking dish.In the prepared dish begin layering with 1/2 of the pasta mixture, then 1/2 of the meat mixture, followed by the other 1/2 of the pasta mixture. Next layer the other half of the mozzarella, followed by the rest of the meat mixture. Top with the other 1/2 of the Parmesan.
Bake in preheated oven for 30 minutes, or until heated through and cheese is melted.