Magic item are great. They allow their bearers to do things beyond the mundane, carry a sense of fantastical wonder (or wondrous fantasy, however you prefer), and can lead to all sorts of ingenius creativity in those moments when someone figures out how to take that item that everyone had written off as being useless (if not actively detrimental) and leverage it to turn around what had seemed like a hopeless situation.
...at least, that's how they should be. Sadly, the origins of D&D tended towards some rather dull magic items, especially when it came to armor and weapons. I can appreciate that just getting that extra +1 felt far more amazing in 1974 than it does some 46 years later, so I'm not trying to hate on Arneson, Gygax, and the others at TSR for the less-than-ideal early ideas. Really, given the value placed on simulationism (likely influenced by the general attitudes of historical wargaming) that lead to things like the Hilarious In Hindsight disease rules in the 1979 Dungeon Masters Guide, they deserve credit for including some more fantastical elements like the various detection powers of intelligent swords, the vitality-draining strikes of the staff of withering, or the chaotic potential of the mirror of life trapping right from the initial publishing. Thus, I say this not to scorn what was done in the past but to encourage continued development along the trails started by those pioneers: we should be doing better now.
As should be evident given my previous posts about magical equipment, when it comes to permanent enchantments, I'm fond of somewhat complex magical gear that has a mixture of advantages and drawbacks. That's because those permanent enchantments are basically always available to whoever bears them, so I like for them to have some balancing act in their use to make up for bypassing most if not all resource management concerns. I'm more open to simple (and usually entirely beneficial) effects when it comes to limited resources like potions, scrolls, or wands. In any case, however, when it comes to making a planned decision to include a magical item in one of my games(*), I think it's worthwhile to start out by thinking about how it was enchanted as a starting point for coming up with the actual enchantment effects. As an added bonus, if the players make an effort to figure out that information in the game, it can lay the idea seeds for getting them to create their own magic items, too.
(*) As an aside, I try to plan any magic items, even if it's just during the quick break for rolling up the adventure details near the start of a Beyond The Wall session. It helps avoid issues about why whoever had those items wasn't using them a moment earlier. But I digress.
Here's a list of ideas, in no particular order:
1. Sympathetic Absorption
The item kept being used for a specific purpose (or by a being focused on a specific purpose), and it ended up adapting itself somehow to become better at that purpose. These enchantments should carry a clear benefit for their purpose, but they generally shouldn't overshadow the accomplishments of the person(s) who caused the enchantment. A dagger used for multiple assassinations might improve at hiding its presence (or its bearer's), start producing its own deadly toxin, or deal extra damage when striking authority figures. The armor of a famed dragon-slayer might provide some resistance to breath weapons, negate fear effects, or whisper the vulnerabilities of its foe in its wearer's mind. A storied warlord's standard might improve morale for its bearer's allies or force its bearer's enemies to suffer temporary weakness/level loss while in its line of sight. The torc of a necromancer might grant its wearer some ability to command mindless undead, inure its wearer to diseases of the grave, or speak the whispers of restless spirits.
2. Bound Spirit
Having a spirit bound within an item is a classic idea. Be creative with this, and don't be afraid to grant the item powers that beyond what the spirit itself could do on its own. The first question to answer here is probably the type of spirit, so here's a d6 table for inspiration:
Demon/Devil/Other malign extra-planar being
Angel (in grace or fallen)/Other extra-planar servitor
Alien/Elemental/Other obtuse extra-planar being
Dragon/Titan/Other magical intelligent creature
Morphic creature (mimic, doppelganger, etc.) trapped in this form
Is the spirit a captive or a willing participant? How has its imprisonment/service affected it? How does it communicate with its bearer (which it should certainly be capable of doing)? What is it actually used for? The spirit needn't be a permanent resident, either; the Soul-Powered Engine trope can be treated as another version of this.
3. Forged for a Mythic Purpose
Another classic idea often combined with #6 and/or #9, although one of my favorite references for this is Fred Saberhagen's Swords of Power series. Each was a masterwork weapon that's valuable in and of itself for being nigh-indestructible, but their full magic is unlocked when used for their specific purpose. Townsaver keeps its wielder fighting for as long as a specific settlement is under attack, Farslayer kills anyone at any distance if the wielder gives it up in the act, Coinspinner grants its bearer matchless luck, Shieldbreaker shatters any other weapons in combat and protects its wielder from all injuries, and so forth. The fact that they all have pretty clear flaws (e.g. Townsaver does nothing to prevent injury or fatigue from killing its wielder after the attack, Farslayer can be picked up by anyone near the victim and be used again, Coinspinner disappears randomly if unattended, Shieldbreaker is worthless against an unarmed foe or beast) probably had considerable influence in why I like imperfections with magic items, but I digress. These types of items are great when used for their intended purpose but are otherwise not especially better than mundane equivalents and can have safeguards or drawbacks when used against their intended purpose. A mace made to sunder armor and battlements might rebel when used against soft flesh, or an urn that captures dying spirits might leave them indelibly scarred if they're resurrected.
4. Inscribed with Magic
Take a normal item, and layer interesting magic on top of it, with or without consideration for whether the form and function go together. An inscribed sword might glow when it senses hostile intent, when it senses clean water, or when it feels that it'll be a rainy day. Feel free to break from the standard magic effects of whatever system you're using when you're coming up with these (which goes for all of these ideas, of course, but I think it's especially important to be mindful of that here) and/or to jam stock items into different shapes. Instead of a stereotypical wand of fireballs, how about a gauntlet that burns off a rune each time it conjures an explosion? Instead of a stereotypical helm of teleportation, how about a bedroll that falls into itself to pop up back in the user's last place of rest? Admittedly, this is the idea that probably does the least to prompt actual abilities/powers, but sometimes it's nice to have a license to go wild, too. The key to keep in mind here is that someone had to do the magical inscribing, so regardless of what the magical effects are, there should be some clear intent behind them (clear to you as the designer, I mean, not necessarily to the players nor to anyone in the game).
5. Infused with Magical Energy
Similar to both #1 and #4, but less purposeful. "Sympathetic Absorption" picks up its magic because of a certain use, and "Inscribed with Magic" is when someone tries to make an item to address a need, whereas "Infused with Magical Energy" is more often a byproduct of the environment. A certain chamber was used for casting divinations, so being near its tapestries now grants a bonus when trying to read minds or view distant places. A temple was burned down in the backlash of some infernal summoning, so shields made from its scorched timbers now grant extra protection against demonic attacks. Statues made with the stones of a bloodstained altar can come alive during the witching hour to seek more sacrifices. This can even be stretched a bit to applying to extreme natural environments as well, such as a sword forged in the heart of a volcano being able to burst into flames, though that starts to tread somewhat into #6. In as much as I think The Sunless Citadel is an overrated module (it's not bad as written, but i think it needs work to really make it good), the Gulthias Tree is actually a great example of this idea, and I'd want to extend it to granting some sort of dark magic to anything made from its wood, too.
6. Made of Supernatural Materials
The armor made of dragons' scales, the weapon forged of meteoric iron, or the fan made from the feathers of a mythic bird are just lovely starting points for magical items. Part of the reason why I'm a big fan of the 2E Monstrous Manual is that it's got so many entries that mention magical uses for monster parts (along with surprisingly extensive open market resale prices for eggs/young and rumors for why sages are interested in certain beings). This is also a great starting point for getting poetic, if you're so inclined, like a dagger formed from tears of regret, a cloak cut from the night sky, a music box with a cylinder embossed by unspoken wishes, or a painting that captured the artist's anger.
In truth, this is where I've gotten the most mileage from players' ideas to make their own magic items. Maybe it's just coincidence, but it seems like killing a monster (not even necessarily magical) is often followed by asking "can I make anything special from its carapace/scales/hide/eyes/heart/etc.?", which is always such a delightful chance to come up with new adventures. Sure, the paws of the monstrous cave bear can be used to make gloves that'll enhance your strength, but they must be soaked in the blood of a giant first. Of course the monstrous cave bear's teeth can be carved into mighty arrow heads, but only shafts made from the wood of the Father of Oak will be able to realize their full potential. The stomach of the monstrous cave bear is useless on its own, but its acid can be used to etch runes of power into a platinum shield, and the bile from the monstrous cave bear's liver is rumored to be an acceptable base for some unique potions. Oh, and keep in mind that those parts will lose their magic if decomposition sets in, so you'll be on a time limit for any of those pursuits if you can't find a way to preserve them.
There's also plenty of potential here for non-butchered and non-poetic materials, of course. Special metals or minerals are a common idea (black gold, red iron, adamantine, etc.), as are materials from a special place (metal from the deepest depths, stones from a magical river's bed, wood from a dryad's glade, etc.).
7. Altered by Alchemy
This is when chemistry and myth come together to make something wondrous, as a more intentional version of #5. Magical alloys are an example, such as the adamantium and carbonadium alloys from Marvel comics or malatium from Brandon Sanderson's Mistborn series, yielding properties far beyond what can be done with normal metals (come to think of it, from the perspective of many D&D settings, stainless steel would be a pretty magical alloy, too). However, I think the feel of that sort of thing typically falls under #6. What I'm more interested in here is normal items that are altered in a magical way by exposure to something else, like the axe of a demonslayer warped by the unnatural residue of their foes, armor dipped into the River Styx to make it indestructible, or a sacred chalice first wetted by menstrual blood. This is something that doesn't come up as much in the usual mythologies or source literature, perhaps aside from the odd item tempered in special magical fire, but it crops up in more modern works; particular in Warhammer literature (where stuff exposed to Chaos or non-human magics often becomes altered by it), although I'd say that some Lamentations of the Flame Princess content also bridges into this (like some effects of the liquid time in the 2014 Death Frost Doom); and in folklore ghost stories or urban legends of good people/things turned bad by contact with some evil. Perhaps most curiously, at least to me, is taking a broader view of this as a means of empowering eldritch locations, similar to the whole "Indian burial ground" idea of Stephen King's Pet Sematary or the 1982 film Poltergeist. A tower built on a foundation of a thousand skeletons, a garden where the dirt was fertilized with the ashes of burnt vampires, or the site where a sinful city sank into the earth could all be other ideas along the same lines. Items grown or harvested in such a place would fall under #5, but making the place itself is this idea.
8. Blessed by a Higher Power
The meat of this idea is likely self-explanatory, but I'll point out that "higher power" doesn't have to mean "divinity". It can be applied just as readily to fey nobility or other beings that are innately magical and above normal mortals (by whatever definition of "above" you deem fit). Tokens granted by a faerie/hag/witch could be a typical non-divine example. Aside from that, there are countless examples in both traditional media and adventure modules of shrines/altars/etc. which can enchant items if the proper rituals are observed that I don't think further discourse is needed here.
9. Created by Magical Beings
Similar to #8, this differs on the grounds of the base item; rather than a normal sword enchanted by a blessing of the Lady of the North Winds, this would be a sword made of wind trapped in an icy blade, for instance. The first thing in this category that always comes to mind for me is Zeus's thunderbolts, made by the cyclopes in Greek mythology (depending on interpretation, of course, but this is my preferred reading), along with the godly weapons forged by the dwarfs in Norse mythology. These are things which were within the normal bounds of skill for the creators yet stand out in comparison to what's normal for other parties. As you might expect, "magical beings" is a flexible term here and can be applied to items of alien technology, too, which is what seems to crop up more often in pulp fantasies and other 20th/21st-century works. If #2 was an excuse to be creative and #6 was an excuse to be poetic, this is an excuse to be weird. A wig of semi-sentient faerie hair, a book that writes out the thoughts of whosoever looks at a blank page, darts of not-quite-glass that are drawn into the bloodstream to lacerate the victim's heart, or a dream catcher woven by the Corvid Queen could all fall under this idea.
10. Empowered by a Curse
This is something that doesn't get called out directly anywhere that I can think of, but it's a matter of seeing the effect of a specialized item from the perspective of what it's meant to combat and trying to extrapolate what might've created it. There's a long tradition of cursed magical items in D&D (e.g. most of the treasure tables in 1980 Basic have a 12.5% chance of a cursed item), but many of them are so thoroughly useless that it's hard to imagine anyone bothering to create them in the first place (other than just to be a dick, I suppose, but that's not exactly a satisfying answer in light of how abundant they are). Turn the situation around a bit, though, and I can start to understand a bow empowered to kill all the relatives of a certain person turning into a general human-slaying bow after enough time, for instance, or the dying curse of a virgin causing a spear to stab its own wielder thereafter. Once I reconciled that to myself, it wasn't much of a stretch to imagine other situations like the last survivor of a royal bloodline sacrificing themselves so that their crown would turn aside any mind-controlling magic or the last wish of a vampire's victim being for their ally's club to become capable of smiting the undead. These sorts of curses coming true wouldn't be a guaranteed thing, but I like the idea that calling out to the universe in a moment of strong emotion and desperation can lead to Fate/Chaos/whatever listening to your words. For extra credit, come up with Jackass Genie interpretations of the curse that don't leave anyone fully satisfied. For instance, that ally's club may effectively become a mace of disruption but also blows itself up when the effect is triggered, the crown of mind-control immunity accomplishes its aim by turning the wearer into a mindless imbecile, or the human-slaying bow becomes unable to hit non-human targets.
I'm not going to suggest that it's worth the trouble to go through all this for every single potion or scroll in a game, especially if you're playing with a system that codifies methods of creating such simple magic items for the players to use as well. However, I would suggest thinking about this when it comes to anything that's supposed to be special. As this post by Justin Alexander talks about, putting in that extra effort to come up with "fluff" details like names, appearances, histories, and so forth can go a long way towards making magic items actually feel magical. In my experience, it's not a difficult or time-consuming thing to do once you get into the habit, and the effort that it takes compared to using stock magic items rolled up from random tables repays itself many times over in the reactions that it gets from the players.