The backstory in that fanfic is not canon. James comes from a rich family, but in order to receive his inheritance, he would have to marry his parents' choice of bride, a woman named Jessebelle. James hates Jessebelle, and for good reason: she is extremely obsessive and controlling towards him, to the point of abuse. James ran away from home and joined Team Rocket, where he is free to do as he pleases.1
Jessie's backstory is more convoluted. She was the daughter of a high-ranking Team Rocket member who disappeared when she was five2. After a lonely, impoverished upbringing, Jessie at first attempted to become a Pokémon Nurse, but failed to graduate3. After that, she turned to crime and eventually joined Team Rocket, where she enjoys the company of her teammates and the extravagance of their missions:
Life before Team Rocket wasn't much fun. She didn't have any toys to play with as a little girl. Not even a tiny Pokémon doll. And to make things worse, she had no friends.
Then she met James, and she wasn't lonely any more. When they met Meowth, their life of evil really began. Being a high-profile Pokémon poacher was full of glamour and excitement. It was a lot more fun than longing for stupid Pokémon dolls.4
1Revealed in Episode 48, "Holy Matrimony!"
2Revealed in "The Birth of Mewtwo", an audio CD released in Japan along with the first movie
3Revealed in Episode 129, "Ignorance is Blissey"
4Taken from the Scholastic book "Team Rocket Blasts Off!", which recounts Team Rocket's backstories, among other scenes from the anime