PHILADELPHIA (AP) _ A man has won custody of his 7-year-old daughter, whose identity and whereabouts were concealed by the federal government after his ex-wife married a mob informant.

Lauren Prisco should be reunited with Anthony Prisco by the end of July, Common Pleas Court Judge Frank M. Jackson ruled Monday. The judge said removing the girl from Michael Morris' home would increase her safety and emotional well-being.

''It is this court's belief that Lauren's risk of danger increases in direct relation to her proximity to Michael Morris, who, it is not unreasonable to believe, is still subject to retaliation for his testimony against a number of organized crime figures,'' Jackson wrote.

Prisco filed suit in December 1983 seeking custody of the girl after she and her mother, Maria, disappeared from Philadelphia. Prisco only discovered the two had been given federal protection, along with Morris, after hiring a private investigator.

The government and Maria Prisco Morris' attorney had contended that the daughter needed tight security to protect her and that Philadelphia was a particularly dangerous place for her.

But Prisco argued precautions taken during visits could leave the girl with the notion ''that I was the one who had done something wrong.''

The judge agreed, writing, ''At the very least, such surreptitious and surveyed contact does not foster the father-daughter relationship.''

Prisco's attorney, Conrad J. Benedetto, praised Jackson's ruling.

''I hope somebody in the federal government realizes that you can't come in and take someone's child just to get the assistance of someone they have caught with their hand in the cookie jar,'' he said. ''To cater to their whims at that expense creates a new class of victims - it doesn't make any sense.''

Mrs. Morris' attorney, Louis J. Ruch, was not in his office this morning and was unavailable for comment.