"With F-Secure’s technology, Facebook will offer a browser-based malware scanner as a free service," the company said in a statement.
F-Secure said the malware scanning and cleanup technology is fully integrated with Facebook.
"When Facebook identifies an account behaving suspiciously, it will redirect the user to the cleanup process. The scan and cleanup is executed directly in the browser window, inside Facebook," it added.
Malware or unwanted software on a computer or device can disrupt normal device performance, steal personal information, or gain access to a system.
It can abuse Facebook users and their friends by posting malicious links or spam which appear to come from a legitimate user's account.
F-Secure said the service will be available to Facebook users whose account has been temporarily frozen due to suspicious activity caused by a potential malware infection.
"Helping people stay safe on Facebook is a hugely important part of what we do and we’re glad to be adding the strength of F-Secure’s anti-virus technology to our existing systems to block and eradicate malware," Software Engineer at Facebook Chetan Gowda said.
The company said when a user is logging in from an infected device, they will see a notification screen about the malware infection along with a recommendation to use F-Secure's scanner.
The user will be given an option to skip the malware removal process or download the recommended scanner.
"We are pleased to partner with Facebook to stop cybercriminals from taking advantage of Facebook's user base for malicious ends," F-Secure Product Manager Arto Saari said.