In college, I was working on a piece where my professor (and I) felt that the leading man was too nice. He just wasn't interesting as a nice guy. It's not that we can't have nice characters, we just need to give them something that makes them more real. My professor's advice was to have him steal something from the leading lady's bedroom. Following her advice led to a subplot and a complication in the friendship between the main characters.
When I write now and I find myself stuck, I look at my characters and think "Who should steal something?" Characters won't always literally steal something, but it reminds me that every now and then people are driven to do something seemingly outside their character. However, I've learned that stealing the right thing makes all the difference in whether the character remains consistent and the theft seems sensible even as it is surprising.
Whatever "crime" you have a character commit, the most important thing is knowing their motive. You don't have to reveal it to your readers. All you need to do is devise the crime within their character. At that point, your characters should be developed enough that readers can postulate on their actions. While the reader may be surprised, a moment's pause will let them make that motive leap all on their own.
Real people are not consistent, but psychologically, our actions almost always make some sort of sense. The same applies to realistic characters. Psychology and sociology can be very helpful in creating characters and making them surprising and consistent. Do your research on what psychological effects could be present in your character given their history.