This was achieved by Thomas Savery in 1698 with his invention, the "Miner's Friend". It was a rudimentary engine that used steam pressure to create suction and lift water.
While Savery's engine was inefficient and dangerous, it proved the potential of steam power and paved the way for later advancements in steam engine technology.