The ALICE detector provides excellent capabilities to study quarkonium production in proton-proton (pp) and heavy-ion collisions at the Large Hadron Collider. Data from pp collisions represent a crucial test for models of quarkonium hadroproduction and are the essential baseline for the measurements in heavy-ion collisions, where quarkonium production is considered a unique probe to study the properties of the hot and dense strongly interacting medium. In ALICE the J/ψ measurement is carried down to pT = 0, via the e+e- decay channel in the central barrel (|y| < 0.9) and via μ+μ- in the muon spectrometer (2.5 < y < 4). Results of the inclusive and prompt J/ψ production cross section in pp collisions at √s = 7TeV (and 2.76 TeV) will be presented. A polarization measurement in the forward region and the dependence of J/ψ yield on charged particle multiplicity in pp collisions will be discussed. Results on the nuclear modification factor (RAA) and elliptic flow (ν2) in Pb-Pb collisions at √sNN = 2.76TeV will be shown.