The natural alkaloid berberine has several pharmacological properties and recently received attention as a potential anticancer agent. In this work, we investigated the molecular mechanisms underlying the anti-tumor effect of berberine on glioblastoma U343 and pancreatic carcinoma MIA PaCa-2 cells. Human dermal fibroblasts (HDF) were used as non-cancer cells. We show that berberine differentially affects cell viability, displaying a higher cytotoxicity on the two cancer cell lines than on HDF. Berberine also affects cell cycle progression, senescence, caspase-3 activity, autophagy and migration in a cell-specific manner. In particular, in HDF it induces cell cycle arrest in G2 and senescence, but not autophagy; in the U343 cells, berberine leads to cell cycle arrest in G2 and induces both senescence and autophagy; in MIA PaCa-2 cells, the alkaloid induces arrest in G1, senescence, autophagy, it increases caspase-3 activity and impairs migration/invasion. As demonstrated by decreased citrate synthase activity, the three cell lines show mitochondrial dysfunction following berberine exposure. Finally, we observed that berberine modulates the expression profile of genes involved in different pathways of tumorigenesis in a cell line-specific manner. These findings have valuable implications for understanding the complex functional interactions between berberine and specific cell types.