The Ministry of Defense (MoD) said the Taliban militants launched the offensive on an Afghan National Army (ANA) base in Anar Dara district.
A statement by MoD said the offensive was repulsed by the Afghan security forces by receiving close-air support from the Afghan Air Force.
MoD said at least 16 militants were also wounded during the clash while the remaining militants fled the area.
The Taliban militants group has not commented regarding the report so far.
Farah is among the relatively volatile provinces in western Afghanistan where anti-government armed militant groups are actively operating in a number of its districts and often carry out insurgency activities.
The attack on the army base in Anar Dara district comes as the group has launched coordinated attacks across the country following the announcement of their spring offensive earlier this month.