Cant remember movie from my childhood

I dont remember much of this movie. I believe it was animated. I watched it in the early 2000s so this movie could be anywhere from late 80s to early 2000s. I remember a kid and hes running from the adult villian. I believe there was another adult with the kid who was a good character.I dont remember if there was a 2nd child or not. The chase scene was almost maze like. The boy had something with him but i dont remember if it was a book or something else. This portion of the movie was definitely towards the end.