Step 4: Form the ester linkage. In an esterification reaction, the hydroxyl group (OH) from the carboxylic acid and the hydrogen (H) from the alcohol's hydroxyl group are removed to form water (H2O), and the remaining oxygen from the alcohol forms a bond with the carbonyl carbon of the acid, creating an ester linkage (COO).