Rinse the lentils under cold water. In a large pot, bring 4 cups of water or vegetable broth to a boil. Add the lentils and cook for about 20 minutes, or until tender but not mushy. Drain and set aside.
In a separate pot, bring 1 cup of water to a boil. Add the rice, cover, and reduce the heat to low. Cook for about 15 minutes, or until the rice is tender and the water is absorbed. Remove from heat and let it sit, covered, for 5 minutes.
Heat olive oil in a skillet over medium heat. Add the sliced onions and cook, stirring frequently, until the onions are deeply caramelized and golden brown (about 15-20 minutes). Remove half of the onions and set aside for garnish.
In the pot with the cooked lentils, add the cooked rice, cumin, coriander, allspice, cinnamon, salt, and black pepper. Stir to combine and heat through for about 5 minutes.
Transfer the Mujaddara to a serving dish and top with the reserved caramelized onions. Garnish with chopped fresh parsley or cilantro if desired.
Enjoy your meal!