>>6558604tl;dr: kids stopped buying the toys because they stopped making them with bright colors, and you had to read Glasslands, The Thursday War, and Mortal Dictata to know what the fuck is going on
Assuming you're talking about G1 (they had a 2-year second generation run that was cancelled a year ago), declining interest and less aggressive marketing. Bionicle ran for nearly a decade, so most of the core audience grew out of it or got bored with it, and the line evolved to a point where it was impenetrable by its target demographic. The main reason it was so successful in the first place was how accessible the toyline was. You could look at nearly any piece of Bionicle promo material in 2001 and get the gist of it without needing to read the Wikipedia article. Beyond the buildable elemental tiki robot motif, nearly every aspect of play was integrated into the story; the collectible masks, combo models, even the building process and packaging had in-universe counterparts, meaning tons of points to start play narratives from. And because of all that and the decent exposure Bionicle had at the time, it was easy to introduce it to friends. The benefit of that goes without saying.
Over time, they stopped doing the little things that made it so easy to jump in, and the lore wasn't so clearly outlined as it used to be. 8 years of dead-end comic book worldbuilding offered no entry point in the story for new fans. Design budgets got a little tighter and sets got a little blander. Then they did a soft reboot, still wasn't performing as well, so it got shelved. Pretty funny how Lego decided it was a good idea for G2 to go in the exact opposite tonal direction of how Bionicle was at the end, except have an even more apathetic approach to whether or not anyone knows it exists, instead of trying to emulate the original conditions for Bionicle's success in the modern toy landscape. [spoiler:lit]at least that's what I hope they were trying to do[/spoiler:lit]