The invention discloses a preparation method for palbociclib (I). The preparation method comprises the following steps: performing cyclization reaction on 2-acetyl-2-butenoic acid methyl ester and malononitrile under an alkaline condition to generate 1,4,5,6-4H-2-methoxyl-4-methyl-5-acetyl-6-oxo-3-pyridine carbonitrile (II); performing substitution reaction on the intermediate (II) and cyclopentane halide (III) under the action of an acid-binding agent to generate N-cyclopentyl-1,4,5,6-4H-2-methoxyl-4-methyl-5-acetyl-6-oxo-3-pyridine carbonitrile (IV); performing condensation reaction on the intermediate (IV) and N-[5-(1-piperazinyl)-2-piperidyl]carbamidine (V)to generate 6-acetyl-8-cyclopentyl-5-methyl-2-[[5-(1-piperazinyl)-2-pyridyl]amino]-5,6-dihydropyrido[2,3-d]pyrimidine-7(8H)-ketone (VI); performing dehydrogenation reaction on the intermediate (VI) and sodium selenate to generate the palbociclib (I). The preparation method for the palbociclib has the advantages that the raw material is easy to obtain, the process is simple, high efficiency and environmental protection are achieved, and the preparation method is suitable for industrial production.