Use the below command to detach an attached policy from an IAM user where username is the name of the user and arn:aws:iam::123456789123:policy/POLICYNAME is the arn of the policy being detached.
aws iam detach-user-policy --user-name username --policy-arn arn:aws:iam::123456789123:policy/POLICYNAME