Bulk superconductivity in a topological semimetal is a first step towards realizing topological superconductors, which can host Majorana fermions allowing us to achieve quantum computing. Here, we report superconductivity and compensation of electrons and holes in single crystals of the nodal-line semimetal CaSb$_2$. We characterize the superconducting state and find that Cooper pairs have moderate-weak coupling, and the superconducting transition in specific heat down to 0.22 K deviates from that of a BCS superconductor. The non-saturating magnetoresistance and electron-hole compensation at low temperature are consistent with density functional theory (DFT) calculations showing nodal-line features. Furthermore, we observe de Haas-van Alphen (dHvA) oscillations consistent with a small Fermi surface in the semimetallic state of CaSb$_2$. Our DFT calculations show that the two electron bands crossing the Fermi level are associated with Sb1 zig-zag chains, while the hole band is associated with Sb2 zig-zag chains. The Sb1 zig-zag chains form a distorted square net, which may relate the $M$Sb$_2$ family to the well known $M$SbTe square net semimetals. Realization of superconductivity and a compensated semimetal state in single crystals of CaSb$_2$ establishes the diantimonide family as a candidate class of materials for achieving topological superconductivity.