In recent years, photoacoustic tomography (PAT) is increasingly used in biomedical research, as it allows for direct visualization of optical absorption in deep tissue. In addition to vascular and hemodynamic imaging using endogenous contrasts, PAT is also capable of imaging neural and molecular dynamics with extrinsic contrasts. While near-infrared (NIR)-absorbing contrasts are preferred for deep tissue imaging, compared to visible-light-absorbing contrasts, they are much harder to design and synthesize with good environmental stability. We introduce here a new PAT mode which utilizes nonlinear multiphoton upconversion of NIR light in situ to visible light, thus exciting locally a dye that can generate strong photoacoustic signal. This approach allows to take advantage of a large library of visible-light-absorbing dyes that can enable functional imaging, such as imaging of voltage, oxygen, pH, and ion channel activities. Two types of upconversion materials are utilized in this work: 1) a two-photon absorbing and emitting dye that is efficiently excited by NIR nanosecond laser pulses to enable pulsed laser-based PAT (pulsed-PAT); and 2) rare-earth containing inorganic nanocrystals that absorb continuous-wave (CW) NIR light by sequential multiphoton absorption through real intermediate states to enable intensity-modulated CW laser-based PAT (CW-PAT). Since both cases produce highly localized nonlinear photoacoustic signal, which has very weak scattering in tissue, we can achieve high contrast 3-D volume imaging of deep tissues. In this study, we validated the principle of our approach in different PAT modes and successfully detected enhanced photoacoustic signals from a visible-light-absorbing dye embedded deep in tissue. With vast variety of functionalized organic dyes operating in the visible range, our mode of nonlinear photoacoustic imaging will find great applications in preclinical and clinical researches.