Myelofibrosis is a myeloproliferative neoplasm that occurs de novo (primary myelofibrosis) or results from the progression of polycythemia vera or essential thrombocytemia (hereafter designated as secondary myelofibrosis or post-polycythemia vera/ essential thrombocythemia myelofibrosis). To progress in the understanding of myelofibrosis and to find molecular prognostic markers we studied 104 samples of primary and secondary myelofibrosis at chronic (n=68) and acute phases (n=12) from 80 patients, by using array-comparative genomic hybridization and sequencing of 23 genes (ASXL1, BMI1, CBL, DNMT3A, EZH2, IDH1/2, JAK2, K/NRAS, LNK, MPL, NF1, PPP1R16B, PTPN11, RCOR1, SF3B1, SOCS2, SRSF2, SUZ12, TET2, TP53, TRPS1). We found copy number aberrations in 54% of samples, often involving genes with a known or potential role in leukemogenesis. We show that cases carrying a del(20q), del(17) or del(12p) evolve in acute myeloid leukemia (P=0.03). We found that 88% of the cases were mutated, mainly in signaling pathway (JAK2 69%, NF1 6%) and epigenetic genes (ASXL1 26%, TET2 14%, EZH2 8%). Overall survival was poor in patients with more than one mutation (P=0.001) and in patients with JAK2/ASXL1 mutations (P=0.02). Our study highlights the heterogeneity of myelofibrosis, and points to several interesting copy number aberrations and genes with diagnostic and prognostic impact.