Make BBQ sauce by combining all BBQ sauce ingredients in a bowl until smooth. Set aside.
Heat up oil in a nonstick skillet over medium-low heat. Add onion and sauté until very soft, about 10 minutes. Remove from heat and set aside.
Add half the lentils to a food processor and puree until smooth. Alternatively, you can puree it with a stick blender or mash with a potato masher.
Add pureed lentils, the other half of the lentils, cooked onion, and the rest of the ingredients except for corn kernels in a large mixing bowl. Mix until well combined, then stir in corn kernels.
Line a bread tin with parchment paper and transfer mixture into it. Let it rest for 15 minutes while you preheat your oven to 180°C / 356°F.
After 15 minutes, spread 4-5 tbsp BBQ sauce on top of the loaf. Transfer to oven and bake for 60 minutes. If the top starts to burn before the loaf is done, cover it with a piece of aluminum foil. The loaf is done when an inserted stick comes out clean.
Remove lentil loaf from the oven and let cool for at least 20 minutes before slicing.
Slice and serve with more BBQ sauce on the side. Enjoy!