Can an attorney commit malicious acts of defamation against you prior to the lawyer or law firm filing a lawsuit? The answer is it depends, and depends on whether the defamatory statement was connected to the lawsuit that was eventually filed, and whether it was in furtherance of the litigation.
This can be a trick issue because some lawyers will believe that have an ABSOLUTE privilege to defame you, but this might not always be the case.
During the actual state or federal litigation will probably be a difference story. Meaning, a lawyer who has filed a lawsuit against you (for example a business, real estate or intellectual property lawsuit) will normally get wide latitude in saying what they want, even if that means it defames you, during the course of an ongoing litigation.
Here is an general legal overview of defamation prior to a filed lawsuit. This is not legal advice or a substitute for legal advice.