Do carboxyl groups behave like bases and amino groups behave like acids when peptide bonds are created?
Yes, an amino acid consists of a carboxyl group, commonly called carboxylic acid, plus the amino group. And yes, a carboxyl group can act as an acid, i.e. release its proton to give a carboxylate. Conversely, an amino group can act as base, its free electron pair accepting a hydrogen to give an ammonium derivate. That is in fact what happens in aquaeous media or in the solid state of amino acids: the carboxylate protonates the amino group creating a zwitterion.

But these are only one type of reactions both groups are capable of performing. In the case of the amino group, as long as it is not protonated (i.e. still has an unbonded electron pair) it can attack nucleophilicly. Maybe you have heard of $\mathrm{S_N}2$ type reactions, that are rather similar.

The nucleophilic attack of the nitrogen could happen on the carboxylate’s proton — but then we wouldn’t be gaining anything, since it would just be the same acid-base reaction. (And this wouldn’t be considered a nucleophilic attack, usually.) Instead, the nitrogen needs to go to the carbonyl group — which happens to be the most positive carbon in an amino acid, so should be a great target for a nucleophile.

The initial result, as I tried to show in the scheme below, is a tetrahedral carbon with a negative charge on the ex-carbonyl oxygen and a positive charge on the nitrogen. If one of the nitrogen’s protons jumps across to the ex-hydroxy oxygen, that one gets positively charged, and then electron pairs move, we release water and gain our peptide bond.



(The picture is really only the basic mock-up and no real effort put into it. It neither exactly matches the biological peptide bond mechanism, nor does it match the mechanism that a chemist would use in the lab. But it conveys the basic picture.)

So while you did technically use the basicity (or postivie-charge loving) of the nitrogen, you see that the acidity of the carboxyl group plays no role in the reaction itself.