Te remove a user from a group in Apple's Open Directory, you need to also remove the members generated uid from the group.
Removing the users is as follows:
<?php
$ldapDN = "uid=myadmin,cn=users,dc=myserver,dc=com';
$ldapPass = "somepass";
$groupDn = 'cn=mygroup,cn=groups,dc=myserver,dc=com'
$removal = array(
"memberuid"=>"username",
"apple-group-memberguid"=>"846DE847-D73D-428D-83A8-B95B606C511B"
);
//connect and bind
$ldapconnect = ldap_connect("myserver.com",389);
ldap_bind($ldapconnect, $ldapDN, $ldapPass);
//removing member from group
ldap_mod_del($ldapconnect, $groupDn, $removal);
//unbind
ldap_unbind($ldapconnect);
?>