Duke University is going on the attack over t-shirts mocking their star basketball player, Grayson Allen ... demanding the clothing company shut the shirt sale down ASAP.

The shirts pissing off the Blue Devils are being sold by Smack Apparel and feature a silhouette of a basketball player with the #3 jersey and the words, "Yo Grayson... Why You Trippin'?"

Duke fired off a cease and desist to Smack -- claiming the company is using Grayson's name and image without permission ... and they're threatening legal action if Smack doesn't comply.

Smack ain't exactly backing down ... owner Wayne Curtiss shot back with a letter of his own to Duke's lawyers claiming his right to create a satirical shirt is protected by the 1st Amendment.

Curtiss does, however, offer a compromise -- he'll fly out to Duke to ask 50 people if they believe the shirt is sponsored or endorsed by Duke or Grayson.

If more than 5 say 'Yes,' he'll cease all production. If not, he wants to be reimbursed for his time and travel expenses.