You are close. There's several possibilities. I'd suggest writing it this way:
"When they were apes in time immemorial, men were a part of nature and not against." or
"As apes in time immemorial, men were a part of nature rather than being against it".