The primary function of Hsp70 is to act as a molecular chaperone. It binds to nascent or unfolded polypeptides to prevent their aggregation and to assist in their proper folding. This process is ATP-dependent, where the binding and release of substrates are regulated by the hydrolysis of ATP.