I have read that the Riemann hypothesis is the most important open question in mathematics and has been open since 1859. I am wondering which famous mathematicians have actually tried to solve it and failed?
This is probably not the best question, because as others have noted, many people work in the area of RH, but since it has resisted direct attack so far, people are typically reluctant to discuss whether or not they are trying to directly prove it, as opposed to chipping away the general area of mathematics that surrounds it.
That being said, here goes an attempt at an answer:
Surely Hardy and Littlewood worked on it, and they proved the first results about infinitude of zeroes on the critical line. Selberg proved a stronger statement, namely that a positive proportion of zeroes lie on the critical line, and in recent times the actual value of this proportion has been greatly improved (Brian Conrey is one contemporary name to mention here).
Of course, infinitude of zeroes is not the same as RH. Regarding RH directly, my understanding is that Paul Cohen worked on it, as did Selberg. I don't know that in either case their private papers related to this have been made public. Connes's work (mentioned by Zarrax) gives a reformulation of the problem, but it's not clear that it gets closer to a solution. Denninger has tried to developed a framework for understanding RH structurally, inspired by the structures used by Deligne in his proof of the RH for varieties in char. $p$ (read about the Weil conjectures if you're not sure what this means), and related to ideas about the (non-existent, but much desired) field with one element. Again inspired in part by Deligne's work, but in quite a different way, Sarnak, Iwaniec, and others have developed a theory of families of automorphic forms and automorphic $L$-functions (the idea being that when Deligne studies RH and related questions in the char. $p$ setting, he uses arguments involving families of varieties and monodromy).
Montgomery was the first to suggest a relationship between the distribution of the zeroes and random matrices, and this is now a significant area of study, closely related to RH.
One thing to note is that in modern mathematics, questions are seldom studied in isolation, and the presumption tends to be that a problem like RH likely won't be solved by an isolated, self-contained piece of work, but rather by an on-going process of building up our understanding of why it should be true, and tools and ideas that are related to the distribution of zeroes, and why this distribution seems to have the amazing properties that it does.
[To get a sense of the cultural context in which a solution might eventually emerge, consider Wiles's proof of FLT: this was brilliant, and contained many new ideas, but it occurred in a context where Frey had first suggested a relationship between FLT and the (richly developed) theory of elliptic curves, a suggestion that was put on a firm footing by Serre and then Ribet, and it relied on essentially all the ideas that had been developed up to that point in the theory of elliptic curves and modular forms. Of course it could be that the proof of RH won't be like this, but I think it's much more likely that it will. And at the moment there are lots of people working to build up our understanding of L-funtions and their zeroes, putting in place ideas and infrastructure which is helping to build up the fertile soil from which a proof might eventually grow.]
A lot of current research in analytic number theory is related to the Riemann hypothesis in some way, often involving proving theorems related to one approach or another towards the result. So in a broad sense most analytic number theorists are working towards the Riemann hypothesis. As for people who have decided to specifically devote themselves to solving the Riemann hypothesis, I know de Branges and Paul Cohen did. (de Branges says he actually solved it). Alain Connes has a relatively detailed program for proving the Riemann hypothesis, so I'd say he counts too. Of course there's a broad middle area between people who are working on problems related to approaches to the Riemann hypothesis and people who have set out to solve it, and it's hard to say who among such people has worked on it seriously enough to be declared to be someone who has tried to solve it.