When the rapper and former drug dealer Curtis Jackson first laid hands on a copy of a vaguely sinister self-help book entitled The 48 Laws Of Power, he says, "I related to it immediately." The book, by Robert Greene, is a coldly amoral compilation of rules for winning life's wars – "Never outshine the master"; "Pose as a friend, work as a spy"; "Crush your enemy totally" – and it seized the imagination of many hip-hop artists, including Busta Rhymes, Jay-Z and Jackson, better known as 50 Cent. Greene's unsentimental view of humanity, which has made his books bestsellers, chimed with their experiences of urban hardship and the dog-eat-dog music industry. 50 Cent, in particular, seems to have experienced Greene's writing as divine revelation: "You know how, no matter how you're feeling, you can go find a passage in the Bible that feels like it was written for that moment? It was like that."

Greene's godlike wisdom, along with his historical references to everyone from Napoleon to Nietzsche, prompted his hip-hop followers to imagine a certain kind of person: elderly, suave and learned – perhaps even dead for several centuries. "He was absolutely not who I thought he'd be," 50 Cent says when I meet the two at the New York office of the rapper's unpleasantly named management company, Violator. They have known each other since 2006, after Greene received word that 50 Cent wanted to meet to discuss a potential collaboration. Greene is a wiry, slightly nerdy guy with a goatee who wears a backpack and looks younger than his 50 years. For his part, Greene expected a thug, whereas in reality 50 Cent, whom everyone calls Fifty, is a quietly-spoken 34-year-old with an infectious grin who hasn't been a thug for some time. Given Fifty's lucrative public image as a gangsta, this is an awkward discrepancy – and, judging by how often he mentions it during our interview, something that preys on his mind.

The result of Greene's encounter with Fifty is a book, The 50th Law, a manual on power similar to the works of Machiavelli or Sun Tzu, only with more anecdotes drawn from the crack trade. From the perspective of the reader, the applicability of Fifty's advice isn't always evident: his way of dealing with a diss from a fellow artist may not translate well to the office, while his former methods for asserting his authority as a dealer are almost certainly best avoided. (Slashing someone's face with a razor is liable to cause offence.) Still, on the book's central theme, the conquest of fear, he can speak with some authority: he was orphaned at eight when his mother was murdered, has been jailed for selling crack, and was once shot nine times at close range through a car window. Besides, he says, "Fear is fear. Even in the more traditional lifestyles – what you might consider complete normalcy – you'll find parallels to what we're talking about. What about the fear you feel going into a new relationship? It's still fear."

Greene, whose standard manner in conversation is that of a man imparting uncomfortable truths to an otherwise namby-pamby and self-deluding world, puts it more bluntly. "So Fifty was shot? Well, you know, some day both you and I are going to die! It's the same reality for all of us. Are you afraid of even thinking of the possibility that you could overcome the same things he overcame?"

In any case, hip-hop's mainstream appeal has never depended on any real overlap between the lives of its creators and those of its (mostly white, suburban) consumers. The acumen of rappers such as 50 Cent lies partly in gratifying the fantasies of middle-class teens who would faint if confronted by a firearm. (Of course, this is also one main defence of rap's most violent or misogynist lyrics: it's just an exercise in unreality, like video games.) "Hip-hop, it's the safari: it allows people who aren't under those circumstances to come closer to inner-city life, to explore it without actually being in danger," Fifty says. "It's something kids in middle America indulge in to be rebellious."

At the summit of the industry, where vivid brand distinctions are everything, Jay-Z and Sean Combs (aka P Diddy) play the wealthy libertines and Kanye West the sensitive soul; 50 Cent plays the gangsta. The role has some downsides. It is for this reason, he feels, that he has had 13 Grammy nominations but no awards: the executives who vote on such decisions are afraid "that their kids may actually want to become like this guy. So I don't receive the accolades these other artists receive." He grins. "But I do receive the rewards financially." This is undeniable: his first two commercial albums, 2003's Get Rich Or Die Tryin' and 2005's The Massacre, both went platinum and have sold more than 21m copies combined. According to Forbes magazine, his 2008 income of $150m, based partly on selling his stake in the drinks manufacturer Glacéau, made him the highest-earning rapper in the world.

As celebrity self-help books go, The 50th Law is surprisingly readable. This may be because it was written by Greene, who is a talented stylist: little effort is made to maintain the illusion that any of the writing was done by 50 Cent, who is referred to in the third person throughout. But it's also because it lacks the cheesy narrative arc of the average star memoir, in which deeds committed in the past are regretted, the protagonist finding a new serenity in ethical conduct and clean living.

50 Cent, by contrast, doesn't really regret his youthful decision to become a crack dealer, subjugating his enemies with violence. He makes a convincing case that, in the horrifying context of his childhood in Queens, New York, the choice made some sense. In 1983, his mother Sabrina, a dealer herself, was drugged and left in her apartment with the gas turned on and the windows sealed. The orphaned Jackson went to live with his grandparents, along with eight aunts and uncles, in a cramped house where he soon faced pressure to bring in money, despite being too young to work. And so at the age of 12, in the midst of the crack epidemic sweeping black America, he turned to the drugs trade, storing his stash at a friend's house and prowling the streets when his grandmother, to whom The 50th Law is dedicated, thought he was at an after-school club.

"If there was another option that would have made sense to me at that time period, I could have taken it," he says now. "But I made my choices at an age when there was an innocence involved. I identify with it being the wrong choice now. But you can't regret that you made it."

True to form, Greene is more viciously opposed to the idea of regret. "Why regret anything? Where does it get you to regret anything you've ever done in your life? It gets you nowhere. It's a pathetic emotion that you can wallow in... And when you get to the point where you don't regret anything, it's very powerful. It frees you up."

This is one of several moments at which 50 Cent seems a little taken aback by the icy absolutism of Greene's amorality. "I always say, when you've been reading The 48 Laws Of Power, you need to go read the Bible after," he says, chuckling. But Greene has a different opinion. "The Bible? The ­ Bible is just one story of incest, adultery and murder after another. It's worse than The 48 Laws."

In 2000, after Fifty had left drugs behind and was on the verge of a deal with Columbia Records, he was shot through the window of the car in which he was travelling, sustaining injuries to the hand, arm, hip, chest, legs and cheek (he speaks with a slur: one bullet hit his jaw). The attack has been variously attributed to an old crack feud and to lyrics he'd released discussing the criminal activities of a Queens drugs kingpin. Panicked, Columbia called off the deal, exiling the rapper to two more years of self-released albums before Eminem, the megastar of the day, noticed his talent and brokered an arrangement with Interscope.

All this might imply that the shooting was a setback. In fact, Fifty quickly co-opted it into his brand-building efforts: a song released soon after, addressing his attacker, is entitled Fuck You. ("A few words for any nigga that get hit the fuck up/My advice if you get shot down is get the fuck up.") The incident is also mined for full effect in The 50th Law, where it's presented as a transformational moment. "When you get hurt as bad as I was hurt when I was shot, either your fear consumes you, or you become, on some level, insensitive," he says. "Things that came to me after that started to matter a lot less. If it happens to you, it could be something basic. It could be the loss of your mom or your dad, but it's dramatic enough to make whatever else happens not such a big deal. And it makes you completely conscious. When you've been in life-threatening situations, you become aware that life is not for ever." He was inspired to bounce back, he says, by wanting to be a father figure for his son Marquise, then two.

This, though, is as high-minded as The 50th Law gets: mostly, it's about manipulating other people in order to get what you want. Greene, whose other books include The Art Of Seduction and The 33 Strategies Of War, is always encountering people who object to this view of life on the straightforward grounds that it's not very nice. Greene says, "I was on a radio show the other day, and this guy, a life coach, was saying, 'You know, I really like your books, they're well-written, but I just think they're evil, blah blah blah.' I said: 'You're talking about how you think people should be, and I'm talking about how people are.' A child wants things to be a certain way. When you get to be an adult, you just understand that some people are good, some are not, and you can't be naive. That's what I told him. 'Be an adult, stop being so silly and childish.' I kind of insulted him on the radio, ­ actually. I get so tired of it." But such objections are all grist to Greene's mill. The frisson of badness is what gives the books much of their appeal.

The 50th Law includes some pleasing accounts of manipulation on Fifty's part. Greene witnessed one in 2007, in response to the unauthorised leak of the video for Follow My Lead. "I remember thinking, 'What would some other CEO have done here?'" Greene says. "He'd have freaked out, yelling. When you get angry, your options narrow. But Fifty was sitting there, all calm, and thinking: what do I need to do here? He's a great storyteller, and he realised he needed to tell a story." Fifty had assistants inform the hip-hop media that he had exploded in rage at news of the leak, ripping a plasma-screen TV from the wall, throwing his mobile phone out of a window and storming off. Fake photographs were staged, and the "outburst" was duly reported. ("A representative of the New York police department said it had not been contacted about the incident," MTV's website noted earnestly.) The resulting buzz enabled 50 Cent to claw back control of the promotional schedule for the song, and presumably boosted sales.

The affair also illustrates 50 Cent's most pressing problem: his success is dependent on his image as a thug, prone to explosions of rage, but he's no longer so keen on actually being one. "You get typecast," he says. "Robert De Niro, Al Pacino? Those guys are for ever Scarface, no matter how many other great roles they've done. And when I start to do things that are away from [my image], my core – the people who initially supported me – they say, 'Aah, I ain't feelin' that.' I've got to give them what they're looking for.

"On [the album] Curtis, my attempt was to make it human, with human emotions, to make it have sad music, joy, anger, being sexual, all the elements of being human. It performed well initially, but it wasn't received so well by the core. They just want more 'Aaargh!'" He adopts a pose reminiscent of a Maori haka. "You know. More of me being the warrior." ("The way they buy you," he once said, apparently with resignation, "is the way you absolutely have to stay.") Does the situation trouble him? "You've got to try to gradually give them something different," he says. "We'll see."

What's most unsettling about Greene's books is not their moral neutrality, but the way they encourage this split between public image and private self: the result of trying to live according to The 48 Laws Of Power, you can't help feeling, would be a constant hyper-vigilance – "Am I giving the impression I want to give?" – that would exhaust you and perhaps drive you insane. Somehow, it's not shocking to learn that this almost happened to Greene himself: he spent much of his young adulthood working in temporary jobs in Europe, and once found himself in Paris pretending to be Irish in order to get a work permit. His lilting accent attracted the attention of a woman from New York. They had a brief relationship. Later, when he moved to Manhattan, Greene looked her up again.

"I said, 'You're the only person I know in New York, so please just meet me at the airport.' My whole plan was to tell her the truth, because I was so tired of being an Irishman. But I'd done it too well. She picks me up, and before I've even opened my mouth, she says, 'I'm taking you home to meet my parents in Queens: they wanted to meet a real Irishman.' So I had to still be an Irishman. We started going out again, and moved in together. I'd talk Irish to her in the apartment and then, as soon as I went out, I wouldn't be Irish. It was fun for a while, but eventually I couldn't stand it." Later, he moved to LA to try to sell a screenplay. It was the cynical behaviour of Hollywood power brokers who pretended they were nice people, he says, that motivated him to write The 48 Laws, as a sort of exposé.

50 Cent, it seems to me, has a somewhat healthier attitude to the public-private split. The point, he says, is to know how to fight, how to display anger, without letting anger control you. He learned this in the boxing ring. "I started boxing at 12, and I was above weight for my age, so they put me in the ring with adults... When you're fighting all the time, it gives you the ability to fight without getting angry." These days, he has a perfect way of reminding himself not to let the anger consume him: he lives in the multi-million-dollar Connecticut mansion originally owned by the disgraced boxer Mike Tyson. "I go to sleep in his house. In what was previously his bedroom. If that's not something to keep you conscious, I don't know what will."

With that, 50 Cent leaps from his chair, off to another appointment. I'm left with the impression of a thoughtful man, significantly more grounded and moral than Greene. But might this have been Greene's plan throughout our interview – a subtle psychological manipulation designed to show off his patron to best effect? Did Greene exaggerate his amorality to make 50 Cent look good by comparison? ("Never outshine the master.") Am I being manipulated, with all of this talk about the ubiquity of manipulation in everyday life, into thinking that I haven't been manipulated? That's the problem with machiavellian thinking: eventually, it does your head in.

"And by the way, take Gandhi," Greene is saying. "I don't want to throw mud at anyone – I really admire Gandhi as a brilliant strategist – but Gandhi was pretty manipulative, you know." He speaks with the weary certainty of one who has seen and understood too much.

"It's just human nature," he says.

• The 50th Law, by 50 Cent and Robert Greene, is published by Profile Books at £15. To order a copy for £14.99, including free UK p&p, go to theguardian.com/bookshop or call 00330 333 6846.