Nonequilibrium processes of small systems such as molecular machines are ubiquitous in biology, chemistry and physics, but are often challenging to comprehend. In the past two decades, several exact thermodynamic relations of nonequilibrium processes, collectively known as fluctuation theorems, have been discovered and provided critical insights. These fluctuation theorems are generalizations of the second law, and can be unified by a differential fluctuation theorem. Here we perform the first experimental test of the differential fluctuation theorem, using an optically levitated nanosphere in both underdamped and overdamped regimes, and in both spatial and velocity spaces. We also test several theorems that can be obtained from it directly, including a generalized Jarzynski equality that is valid for arbitrary initial states, and the Hummer-Szabo relation. Our study experimentally verifies these fundamental theorems, and initiates the experimental study of stochastic energetics with the instantaneous velocity measurement.