MUNHALL, Pa. (AP) _ A gunman who wounded two police officers and then nervously held four hostages, including his daughter, for more than 16 hours surrendered early Wednesday to the applause and cheers of relieved neighbors.

Police filed 23 charges against Paul W. Ford, including attempted homicide, aggravated assault, kidnapping, felonious restraint and making terroristic threats, said Sgt. Cliff O'Hara.

Ford, 29, was brought out of the apartment house about 3 a.m., handcuffed to his attorney and another lawyer who both helped negotiate his surrender.

''He had agreed to come out an hour before he actually did it. He just had to work himself up to do it,'' said Robert Kroner, superintendent of Allegheny County police. ''We just had to be patient and keep reassuring him he wouldn't be hurt.''

Ford was arraigned in night court and jailed in lieu of $500,000 bond.

Officers Thomas Hilla and Paul Gyurina were shot as they knocked at his apartment door, police said. Neither was hurt seriously.

The siege began about 10:30 a.m. after Ford argued with his girlfriend, Zetra Rose, then grabbed her and his daughter as they approached a neighbor's house. The girlfriend freed herself, and Ford ran into the apartment building, grabbing another woman and her two young children.

Ford had released two hostages, Tammy Vandiver, 23, a resident of the building, and her 2-year-old son, Andrew, around 6:30 p.m. Until the end, he kept as captives Ms. Vandiver's 4-year-old daughter, Nikki, and his 6-year-old daughter, Zetra.

''They were little angels up there,'' said Kroner. ''They didn't ask for anything to eat or drink. The one just kept telling him, 'Daddy, it'll be okay.' ''

Ford had made no demands, police said.

''He was nervous. He was worried about being shot,'' Ms. Vandiver said.

According to county records, Ford was charged in 1975 with aggravated assault for beating a woman, Lesa Sanders, in the face with a piece of metal. Charges were dropped because Ms. Sanders refused to testify.

Ford pleaded guilty to aggravated assault and other charges on Dec. 16, 1980, for allegedly pointing a gun at a county police officer. He was ordered to serve 1 1/2 to 3 years in Western Penitentiary.

Ford was convicted Feb. 21, 1980, of making terroristic threats in connection with a fued with another man. He was sentenced to two years of probation.