Number two seed Wozniacki won the first set against Monica Puig 6-0, but then lost the next two 6-4 6-4.
"I am fully aware that tennis is a game of wins and losses," the Dane said on her Twitter account.
"However, during the match last night people in the crowd threatened my family, wished death threats on my mom and dad, called me names that I can't repeat here and told my fiance's niece and nephew (who are 10 years old) to sit down and shut... up.
"Meanwhile security and staff did nothing to prevent this and even accepted this to take place."
Tournament director James Blake denied security had been notified of the incident.
"During the match we had tournament and WTA staff as well as tournament security courtside," he said in a statement. "They never witnessed, nor were they notified of any specific threats made to the players or their families.
"If we had been notified, the situation would have been handled immediately."
He noted the match "was played in front of a loud and passionate crowd," adding "while I personally feel that no one should have to endure any sort of abuse on the court, we do our best to provide a safe and fair environment."
In her tweet, Wozniacki added: "When certain lines are crossed, it makes tennis miserable for both competitors.
"I hope the Miami Open chooses to take this seriously because it's a horrible example to set for the next generation of tennis players and fans."