Titanium and titanium alloys are widely used in orthopedic implants. Modifying the nanotopography provides a new strategy to improve osseointegration of titanium substrates. Filamentous actin (F-actin) polymerization, as a mechanical loading structure, is generally considered to be involved in cell migration, endocytosis, cell division, and cell shape maintenance. Whether F-actin is involved and how it functions in nanotube-induced osteogenic differentiation of mesenchymal stem cells (MSCs) remain to be elucidated. In this study, we fabricated TiO2 nanotubes on the surface of a titanium substrate by anodic oxidation and characterized their features by scanning electron microscopy (SEM), X-ray energy dispersive analysis (EDS), and atomic force microscopy (AFM). Alkaline phosphatase (ALP) staining, Western blotting, qRT-PCR, and immunofluorescence staining were performed to explore the osteogenic potential, the level of F-actin, and the expression of MKL1 and YAP/TAZ. Our results showed that the inner diameter and roughness of TiO2 nanotubes increased with the increase of the anodic oxidation voltage from 30 to 70 V, while their height was 2 μm consistently. Further, the larger the tube diameter, the stronger the ability of TiO2 nanotubes to promote osteogenic differentiation of MSCs. Inhibiting F-actin polymerization by Cyto D inhibited osteogenic differentiation of MSCs as well as the expression of proteins contained in focal adhesion complexes such as vinculin (VCL) and focal adhesion kinase (FAK). In contrast, after Jasp treatment, polymerization of F-actin enhanced the expression of RhoA and transcription factors YAP/TAZ. Based on these data, we concluded that TiO2 nanotubes facilitated the osteogenic differentiation of MSCs, and this ability was enhanced with the increasing diameter of the nanotubes within a certain range (30–70 V). F-actin mediated this process through MKL1 and YAP/TAZ.