A search is performed for heavy Majorana neutrinos (N) using an event signature defined by two same-sign charged leptons of the same flavour and two jets. The data correspond to an integrated luminosity of 4.98 1/fb of pp collisions at a centre-of-mass energy of 7 TeV collected with the CMS detector at the Large Hadron Collider. No excess of events is observed beyond the expected standard model background and therefore upper limits are set on the square of the mixing parameter as a function of heavy Majorana-neutrino mass. These are the first direct upper limits on the heavy Majorana-neutrino mixing for mass larger than 90 GeV.