In vivo electronic monitoring systems for underwater applications are promising technologies for obtaining information about aquatic animals. State-of-the-art devices are constrained by limits on the number of integrated sensors, large dimensions and weight, and short device longevity. Here, we report the Lab-on-a-Fish: the world’s first biotelemetry tag that combines edge computing with wireless sensing of in vivo physiology [electrocardiogram (ECG) and electromyogram (EMG)], behavior [activity level and tail beat frequency (TBF)], and ambient environment (temperature, pressure, and magnetic field). The Lab-on-a-Fish has a miniaturized form (dry weight: 2.4 g; wet weight: 0.8 g; and dimensions: 5.5 mm <inline-formula xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"> <tex-math notation="LaTeX">${\times }\,\,6.5$ </tex-math></inline-formula> mm <inline-formula xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"> <tex-math notation="LaTeX">${\times }\,\,37$ </tex-math></inline-formula> mm) for studying small animals. Engineering efforts spanning improvements in battery chemistry, electronic circuit efficiency, and power-saving algorithms extend the longevity of the device to as much as eight months. The designed piezoelectric transducer and its driving circuit enable underwater wireless communication of multiplexed digital sensor data over a distance up to 400 m. The Lab-on-a-Fish can also store the raw data using flash memory for use in locations that are challenging for acoustic communications or when more complex data postprocessing is needed. Long-term in vivo validation in three species—rainbow trout (Oncorhynchus mykiss), white sturgeon (Acipenser transmontanus), and walleye (Sander vitreus)—demonstrated the device’s sensing potential for biological and environmental applications.