Ronin is a masked identity that has been taken on by several characters in Marvel Comics. One notable character to use this alias is Clint Barton (Hawkeye).
The Ronin in Marvel has a back story filled with pain and vengeance. After the Snap, Clint Barton lost his family. This drove him to create a new identity for himself - Ronin. He was a man on a mission. He cut off all his ties to his former life as Hawkeye. His suit was different, all black, symbolizing his new, darker path. He hunted down those he deemed responsible for the chaos in the world post - Snap. His journey as Ronin was also about self - discovery in a way, as he had to find a new purpose in a world that had been turned upside down. It was only later that he re - joined the Avengers as Hawkeye to fight in the final battle in Endgame.
Grief is a key element. Clint Barton's family loss led him to become Ronin. Another key is his transformation from Hawkeye to a more brutal vigilante. Also, the chaotic state of the world after the Snap which he was reacting to.
Ronin's back story could involve some sort of betrayal. He might have been betrayed by someone he trusted, which made him turn his back on his former life. This led him to cross paths with the Guardians of the Galaxy. He may have skills or knowledge that the Guardians find useful, but his past still haunts him. He could be on a journey to find out the truth about his past and those who wronged him.
Ronin could have been part of a secret organization in the Marvel Guardians of the Galaxy universe. This organization might have been involved in some shady activities. Ronin, realizing the wrongdoings, broke away from it. However, this made him a target. The Guardians of the Galaxy then became his allies as they were also against the kind of activities the organization was involved in. His back story is thus a tale of escape from a dark past and finding new purpose among the Guardians.
The movie Ronin indeed takes inspiration from the graphic novel. They share core elements and themes, but the movie might have made some adaptations for the big screen.