Intracellular pH (pHi) is a fundamental modulator of cell function. Minute changes in pHi may cause great effects in many cellular activities such as metabolism and signal transduction. Herein we report an electrochemical pHi sensor based on viral-coat proteins-DNA nanotubes modified gold electrode. The sensor is pH-sensitive as a result of the pH-dependent electrochemical property of methylene blue (MB) and cell permeable owing to the polyarginine domain of the cowpea chlorotic mottle virus (CCMV) coat protein. Moreover, because the pH sensor can be translocated into cells without any further operations, the measurement of pHi changes can be greatly simplified. The pH sensor has a broad pH spectrum in the pH range from 4.0 to 9.0 and responds rapidly to the pH changes of cells, so it may hold great potential to be a valuable tool to study pH-dependent biological and pathological processes in the future.