The two vessels from the North retreated about eight minutes after the South fired five 40 mm artillery shots at around 7:30 a.m. (22:30 GMT), the officials said.
The North Korean boats had crossed the Northern Limit Line, a border that the North disputes, near South Korean border island Yeonpyeong, according to the South Korean military.
North Korean fishing boats occasionally stray into South Korean waters.
Over the years, navy vessels from both sides have traded fire in sometimes deadly incidents in the area, including in 2010, when 46 South Korean sailors were killed when their ship sank in what the South says was a torpedo attack by the North. North Korea has denied responsibility.
North and South Korea remain in a technical state of war since their 1950-53 conflict ended in a truce, not a peace treaty.
Pyongyang recently proposed military talks with the Seoul, but the South dismissed the offer as "a bogus peace offensive" because it lacks a plan to end the North's nuclear program.