A man has been charged after he allegedly put rat poison in his partner's coffee on Sydney's southern outskirts.

Police say a 32-year-old woman was drinking coffee in her home at Wilton in May.

After several cups, she noticed odd-looking granules in the coffee jar and contacted police.

Tests revealed the jar contained rat poison.

Inspector Stephen Parry says the woman was lucky.

"The lady was examined at Campbelltown Hospital, and was not suffering any adverse illness at the time," he said.

After a three-month investigation, the man attended Narellan Police Station yesterday and was charged with using poison to endanger life and administering poison with intent to injure.

He has been released on bail to face Camden Local Court later this month.

Police say they cannot reveal any information about a motive for the alleged crime, and the couple was not known to police.

An apprehended violence order against the man remains in place.